Skip to content

Commit

Permalink
run help on container after build
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Mar 29, 2023
1 parent 59e2967 commit 23ed75c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ jobs:
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install apptainer
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:apptainer/ppa
sudo apt update
sudo apt install -y apptainer
- name: Calculate metadata for image
id: image-meta
uses: docker/metadata-action@v4
Expand All @@ -39,6 +47,7 @@ jobs:
type=ref,event=branch
type=ref,event=tag
type=sha,prefix=
- name: Build and push image
uses: docker/build-push-action@v4
with:
Expand All @@ -49,6 +58,16 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Test image by running help
run: singularity exec docker://ghcr.io/stackhpc/io500-singularity:${{ steps.image-meta.outputs.tags[1] }} -h

# - name: Delete package if it failed tests
# uses: actions/delete-package-versions@v4
# with:
# package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3'
# package-name: 'test-package'
# package-type: 'npm'

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
Expand Down

0 comments on commit 23ed75c

Please sign in to comment.