diff --git a/.github/workflows/container_build.yml b/.github/workflows/container_build.yml index e05afa8..729c236 100644 --- a/.github/workflows/container_build.yml +++ b/.github/workflows/container_build.yml @@ -31,8 +31,7 @@ jobs: type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + type=pep440,pattern={{version}} type=sha type=raw,value=latest,enable={{is_default_branch}} - name: Set up QEMU diff --git a/.github/workflows/container_build_push.yml b/.github/workflows/container_build_push.yml index 6fdfb4e..7a2f40b 100644 --- a/.github/workflows/container_build_push.yml +++ b/.github/workflows/container_build_push.yml @@ -23,12 +23,9 @@ jobs: ghcr.io/${{ github.repository_owner }}/mtag # generate Docker tags based on the following events/attributes tags: | - type=schedule type=ref,event=branch - type=ref,event=pr type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + type=pep440,pattern={{version}} type=sha type=raw,value=latest,enable={{is_default_branch}} - name: Set up QEMU @@ -98,7 +95,8 @@ jobs: push_tags="$(printf $csv_tags | sed -e "s/mtag/mtag_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 mtag.sif docker://"$first_tag" + # docker run --rm --privileged -v $(pwd):/work kaczmarj/apptainer build mtag.sif docker://"$first_tag" + docker run --rm --privileged -v $(pwd):/work kaczmarj/apptainer build -F --build-arg mtag_image="$first_tag" mtag.sif apptainer/mtag.def oras push "$push_tags" mtag.sif rm mtag.sif shell: sh diff --git a/containers/README.md b/apptainer/README.md similarity index 100% rename from containers/README.md rename to apptainer/README.md diff --git a/apptainer/mtag.def b/apptainer/mtag.def new file mode 100644 index 0000000..a41016f --- /dev/null +++ b/apptainer/mtag.def @@ -0,0 +1,9 @@ +Bootstrap: docker +From: {{ mtag_image }} + +%post + +%environment + +%runscript + exec /opt/conda/bin/python /mtag/mtag.py "$@"