Skip to content

Commit

Permalink
fix: updates e2e tests checkout ref during image publishing (#334)
Browse files Browse the repository at this point in the history
When rebuilding old images, we need to run the E2E from that
references to avoid issues with breaking changes in the CLI.

Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 authored Sep 4, 2024
1 parent c7a05ee commit 5439b91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 2 additions & 5 deletions .github/actions/publish-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ inputs:
release_version:
required: true
description: The version to build type semver tags from
git_ref:
required: true
description: The git reference to build image from
no_cache:
description: Skip using cache when building the image.
required: false
Expand Down Expand Up @@ -52,7 +49,7 @@ runs:
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 # pin@v5
id: build-and-export
with:
context: "${{ github.server_url }}/${{ github.repository }}.git#${{ inputs.git_ref }}"
context: "."
load: true
no-cache: ${{ inputs.no_cache == 'true' }}
cache-from: type=gha
Expand Down Expand Up @@ -81,7 +78,7 @@ runs:
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 # pin@v5
id: build-and-push
with:
context: "${{ github.server_url }}/${{ github.repository }}.git#${{ inputs.git_ref }}"
context: "."
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ jobs:
password: ${{ secrets.QUAY_TOKEN }}
registry: ${{ env.IMAGE_REGISTRY }}

- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
with:
persist-credentials: false

- name: Set up cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # [email protected]

Expand Down Expand Up @@ -97,6 +92,12 @@ jobs:
} >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
with:
ref: ${{ env.BUILD_GIT_REF }}
persist-credentials: false

- name: Build and Publish the image
uses: ./.github/actions/publish-image
Expand All @@ -105,7 +106,6 @@ jobs:
image: ${{ env.IMAGE_REGISTRY }}/${{ vars.QUAY_ORG }}/${{ env.IMAGE_NAME }}
release_version: ${{ env.TAG }}
no_cache: ${{ env.NO_CACHE }}
git_ref: ${{ env.BUILD_GIT_REF }}
skip_tests: ${{ env.SKIP_TESTS }}

- name: Sign the image with GitHub OIDC Token
Expand Down

0 comments on commit 5439b91

Please sign in to comment.