Skip to content

Commit

Permalink
clean up with load turned off
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Dec 17, 2024
1 parent db32356 commit b9e1884
Showing 1 changed file with 10 additions and 54 deletions.
64 changes: 10 additions & 54 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,92 +8,48 @@ env:
REGISTRY: ghcr.io
IMAGE_NAME: gsa-tts/trestle

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: latest=true
flavor: latest=false
tags: type=raw,value=${{ github.sha }}

# Build Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build
- name: Build Docker image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
push: false
load: true
# load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


# build-glr:
# needs: build
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# # This is used to complete the identity challenge
# # with sigstore/fulcio when running outside of PRs.
# id-token: write
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: trestle-base-img
# path: /tmp

# - name: Load image
# run: |
# docker load --input /tmp/myimage.tar
# docker image ls -a

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0

- name: Extract Docker metadata - glr variant
id: meta-glr
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: latest=false
tags: |
type=raw,value=latest-glr
tags: type=raw,value=${{ github.sha }}-glr

- name: Build and push Docker image - glr variant
id: build-glr
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
file: Dockerfile.glr
build-args: BASE_VERSION=pr-52
build-args: BASE_VERSION=${{ github.sha }}
push: false
load: true
# load: true
tags: ${{ steps.meta-glr.outputs.tags }}
labels: ${{ steps.meta-glr.outputs.labels }}

0 comments on commit b9e1884

Please sign in to comment.