Skip to content

Commit

Permalink
Publish release tags for containers, on release
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenain committed Feb 1, 2024
1 parent d062d8e commit b7dc7f8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/deploy-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
apptainer-version: 1.1.7

- name: Build ${{ matrix.deffiles[1] }}
- name: Build ${{ env.container }} container
run: |
echo "Preparing to build ${{ env.container }} from ${{ matrix.deffiles[0] }}"
if [ ! -f "${{ matrix.deffiles[0]}}" ]; then
Expand All @@ -55,7 +55,12 @@ jobs:
run: |
echo ${{ github.token }} | apptainer remote login --username ${{ github.actor }} --password-stdin oras://${{ env.registry }}
- name: Deploy ${{ matrix.deffiles[1] }}
- name: Deploy ${{ env.container }} container
# Assign the release tag to container on release
if: github.event_name == 'release'
run: |
apptainer push ${{ env.container }}.sif oras://${{ env.registry }}/${{ github.repository }}:${{ github.ref }}
# Otherwise, the container tag is "latest" by default.
# Don't push the container on a pull request.
if: github.event_name != 'pull_request'
run: |
Expand Down

0 comments on commit b7dc7f8

Please sign in to comment.