66
77env :
88 IMAGE_NAME : preflight
9-
9+
1010jobs :
1111 build-main :
12+ # TODO: Set explicit permissions for this job.
13+ # zizmor: ignore[excessive-permissions]
1214 name : Build and push main snapshot images
1315 strategy :
1416 matrix :
1517 architecture : [amd64,ppc64le,arm64,s390x]
1618 platform : [linux]
1719 runs-on : ubuntu-latest
1820 steps :
19- - uses : actions/checkout@v5
21+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22+ with :
23+ persist-credentials : false
2024 - name : Fetch latest release version
21- uses : reloc8/action-latest-release-version@1.0.0
25+ uses : reloc8/action-latest-release-version@b8d6337f30390558e7874a044d6a3c1314314bab # 1.0.0
2226 id : fetch-latest-release
23- - name : Set Env Tags
24- run : echo RELEASE_TAG=${{ steps.fetch-latest-release.outputs.latest-release }} >> $GITHUB_ENV
25- - name : set short sha
26- run : echo SHA_SHORT=$(git rev-parse --short HEAD) >> $GITHUB_ENV
27+
28+ - name : Set release tag and short SHA
29+ run : |
30+ echo "RELEASE_TAG=${RELEASE_TAG}" >> "${GITHUB_ENV}"
31+ echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}"
32+ env :
33+ RELEASE_TAG : ${{ steps.fetch-latest-release.outputs.latest-release }}
2734
2835 - name : Set up QEMU
29- uses : docker/setup-qemu-action@v3
36+ uses : docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
3037
3138 - name : Build Image
3239 id : build-image
33- uses : redhat-actions/buildah-build@v2
40+ uses : redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
3441 with :
3542 image : ${{ secrets.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}
3643 tags : ${{ env.SHA_SHORT }}-${{ matrix.platform }}-${{ matrix.architecture }}
4451
4552 - name : Run and Validate Image
4653 run : |
47- if ! podman run --rm ${IMAGE_WITH_TAG} version; then
54+ if ! podman run --rm " ${IMAGE_WITH_TAG}" version; then
4855 echo "Image validation failed. The 'podman run' command returned a non-zero exit code."
4956 exit 1
5057 fi
5360
5461 - name : Push Image
5562 id : push-image
56- uses : redhat-actions/push-to-registry@v2
63+ uses : redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
5764 with :
5865 image : ${{ env.IMAGE_NAME }}
5966 tags : ${{ env.SHA_SHORT }}-${{ matrix.platform }}-${{ matrix.architecture }}
@@ -62,22 +69,28 @@ jobs:
6269 password : ${{ secrets.REGISTRY_PASSWORD }}
6370
6471 - name : Print image url
65- run : echo "Image pushed to ${{ steps.push-image.outputs.registry-paths }}"
72+ run : echo "Image pushed to ${REGISTRY_PATHS}"
73+ env :
74+ REGISTRY_PATHS : ${{ steps.push-image.outputs.registry-paths }}
6675
6776 outputs :
6877 imageName : ${{ env.IMAGE_NAME }}
6978 imageVersion : ${{ env.SHA_SHORT }}
7079
7180 build-coverage :
81+ # TODO: Set explicit permissions for this job.
82+ # zizmor: ignore[excessive-permissions]
7283 runs-on : ubuntu-latest
7384 steps :
74- - uses : actions/checkout@v5
85+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
86+ with :
87+ persist-credentials : false
7588
7689 - name : Install system deps
7790 run : ' sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev'
7891
7992 - name : Set up Go
80- uses : actions/setup-go@v6
93+ uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
8194 with :
8295 go-version-file : go.mod
8396
@@ -94,12 +107,14 @@ jobs:
94107 run : make cover
95108
96109 - name : Coveralls
97- uses : coverallsapp/github-action@v2
110+ uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
98111 with :
99112 github-token : ${{ secrets.GITHUB_TOKEN }}
100113 file : coverage.out
101114
102115 build-multiarch :
116+ # TODO: Set explicit permissions for this job.
117+ # zizmor: ignore[excessive-permissions]
103118 needs : build-main
104119 uses : ./.github/workflows/build-multiarch.yml
105120 with :
0 commit comments