Skip to content

Commit 470a090

Browse files
committed
Additional tweaks for the future singularity image generation CI workflow
1 parent 10b8f75 commit 470a090

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/container.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,26 @@ jobs:
3737
uses: docker/metadata-action@v6.0.0
3838
with:
3939
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
tags: |
41+
type=schedule
42+
type=ref,event=branch
43+
type=ref,event=tag
44+
type=ref,event=pr
45+
type=sha
46+
# type=semver,pattern={{version}}
47+
# type=semver,pattern={{major}}.{{minor}}
4048

4149
build-test-containers:
4250
needs:
4351
- gather-metadata
4452
# - changes
4553
runs-on: ubuntu-latest
54+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
55+
permissions:
56+
contents: read
57+
packages: write
58+
attestations: write
59+
id-token: write
4660
strategy:
4761
# Keep going on other deployments if anything bloops
4862
fail-fast: false
@@ -97,7 +111,7 @@ jobs:
97111
shell: /bin/bash {0}
98112
run: |
99113
singularity registry login -u "${{ github.actor }}" -p "${{ secrets.GITHUB_TOKEN }}" oras://ghcr.io
100-
declare -a tags=( ${{ needs.gather-metadata.outputs.tags }} ${{ needs.gather-metadata.outputs.labels }} )
114+
declare -a tags=( ${{ needs.gather-metadata.outputs.tags }} )
101115
for tag in "${tags[@]}" ; do
102116
echo singularity push container.sif "oras://ghcr.io/${GITHUB_REPOSITORY}${tag}"
103117
done

0 commit comments

Comments
 (0)