Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updates e2e tests checkout ref during image publishing #334

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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