From 5232bfc4b04c59cda21e8fb7b39aaff736aaa49a Mon Sep 17 00:00:00 2001 From: Paul Stretenowich Date: Tue, 29 Oct 2024 15:19:32 -0400 Subject: [PATCH] Debug --- .github/workflows/docker-publish.yml | 48 +++++++++++++++------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 038e36c..059e106 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -14,7 +14,7 @@ env: # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: - build-and-push-image: + build-and-push-docker: runs-on: ubuntu-latest # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. @@ -67,28 +67,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - name: Build and push Apptainer image - if: ${{ ! startsWith(github.ref, 'refs/tags/') }} - steps: - - uses: actions/checkout@v4 - - uses: eWaterCycle/setup-apptainer@v2 - with: - apptainer-version: 1.3.4 - - name: Create sif image - run: | - apptainer build -F container/wrapper_genpipes/images/genpipes-${{ env.TAG_NAME }}.sif docker-daemon://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} - cd container/wrapper_genpipes/images/ - ln -sf genpipes-${{ env.TAG_NAME }}.sif genpipes.sif - cd ../../ - tar -zcvf wrapper_genpipes.tgz wrapper_genpipes - - name: Upload sif image - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: container/wrapper_genpipes.tgz - asset_name: wrapper_genpipes.tgz - tag: ${{ github.ref }} - overwrite: true # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. # It increases supply chain security for people who consume the image. @@ -99,3 +77,27 @@ jobs: subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true + + build-and-push-apptainer: + runs-on: ubuntu-latest + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + steps: + - uses: actions/checkout@v4 + - uses: eWaterCycle/setup-apptainer@v2 + with: + apptainer-version: 1.3.4 + - name: Create sif image + run: | + apptainer build -F container/wrapper_genpipes/images/genpipes-${{ env.TAG_NAME }}.sif docker://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} + cd container/wrapper_genpipes/images/ + ln -sf genpipes-${{ env.TAG_NAME }}.sif genpipes.sif + cd ../../ + tar -zcvf wrapper_genpipes.tgz wrapper_genpipes + - name: Upload sif image + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: container/wrapper_genpipes.tgz + asset_name: wrapper_genpipes.tgz + tag: ${{ github.ref }} + overwrite: true