Skip to content

Commit

Permalink
Replace apptainer version
Browse files Browse the repository at this point in the history
Fixes #50
  • Loading branch information
espenhgn committed Oct 1, 2024
1 parent 930f937 commit f4ad1ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/container_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,24 @@ on:
- "v*.*.*"
env:
TEST_TAG: ghcr.io/precimed/container_template:test
# LATEST_TAG: ghcr.io/precimed/container_template:latest

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository_owner }}/container_template
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=pep440,pattern={{version}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/container_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository_owner }}/container_template
# generate Docker tags based on the following events/attributes
ghcr.io/${{ github.repository_owner }}/container_template
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=pep440,pattern={{version}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
Expand Down Expand Up @@ -76,6 +76,10 @@ jobs:
steps:
- name: Check out code for the container builds
uses: actions/checkout@v4
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.3.4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -96,8 +100,7 @@ jobs:
EOF
push_tags="$(printf $csv_tags | sed -e "s/container_template/container_template_sif/g")"
echo ${{ secrets.GITHUB_TOKEN }} | oras login --username ${{ github.repository_owner }} --password-stdin ghcr.io
docker pull kaczmarj/apptainer:latest
docker run --rm --privileged -v $(pwd):/work kaczmarj/apptainer build container_template.sif docker://"$first_tag"
apptainer build container_template.sif docker://"$first_tag"
oras push "$push_tags" container_template.sif
rm container_template.sif
shell: sh

0 comments on commit f4ad1ec

Please sign in to comment.