Skip to content

Commit

Permalink
ci: minor refactor to build-images job
Browse files Browse the repository at this point in the history
We don't want to run `make version` in the context of a PR branch, so run it from master
before checking out the PR branch.

Signed-off-by: William Findlay <will@isovalent.com>
  • Loading branch information
willfindlay committed Oct 18, 2023
1 parent 99dfee6 commit 577dfe6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build-images-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,26 @@ jobs:
echo "tag=${{ github.sha }}" >> $GITHUB_OUTPUT
fi
- name: Checkout Source Code
- name: Checkout master branch
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
persist-credentials: false
ref: ${{ steps.tag.outputs.tag }}
ref: ${{ github.event.repository.default_branch }}
fetch-depth: 0

- name: Get version
run: |
echo "TETRAGON_VERSION=$(make version)" >> $GITHUB_ENV
# Warning: since this is a privileged workflow, subsequent workflow job
# steps must take care not to execute untrusted code.
- name: Checkout pull request branch (NOT TRUSTED)
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
persist-credentials: false
ref: ${{ steps.tag.outputs.tag }}
fetch-depth: 0

- name: Install Cosign
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b # v3.0.5

Expand Down

0 comments on commit 577dfe6

Please sign in to comment.