Skip to content

Commit

Permalink
free disk space
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Meloni committed Nov 20, 2024
1 parent 36b94b7 commit 2134877
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
env:
IMAGE_NAME: mucoll-spack
steps:
- name: Free up disk space
run: rm -rf /opt/hostedtoolcache
- name: Checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -68,19 +66,19 @@ jobs:
REPOSITORY=${{ env.REGISTRY }}/${{env.OWNER_LC}}
tags: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/${{ env.IMAGE_NAME}}:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.containerimage.digest }}
push-to-registry: true
build-base:
runs-on: ubuntu-latest
needs: build-spack
strategy:
matrix:
os: [{dir: AlmaLinux9,suffix: alma9}]
env:
IMAGE_NAME: mucoll-minimal
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1
with:
tool-cache: true
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -90,7 +88,7 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: lowercase owner name
Expand All @@ -102,7 +100,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{env.OWNER_LC}}/mucoll-dummy
images: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-dummy
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v6
Expand All @@ -112,15 +110,20 @@ jobs:
file: ./${{matrix.os.dir}}/Dockerfile-base
build-args: |
VERSION=${{ steps.meta.outputs.version }}
REPOSITORY=ghcr.io/${{env.OWNER_LC}}
tags: ghcr.io/${{env.OWNER_LC}}/mucoll-base:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
REPOSITORY=${{ env.REGISTRY }}/${{env.OWNER_LC}}
tags: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/${{ env.IMAGE_NAME}}:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
labels: ${{ steps.meta.outputs.labels }}
build-sim:
runs-on: ubuntu-latest
needs: build-base
strategy:
matrix:
os: [{dir: AlmaLinux9,suffix: alma9}]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1
with:
tool-cache: true
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -130,7 +133,7 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: lowercase owner name
Expand All @@ -142,7 +145,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{env.OWNER_LC}}/mucoll-dummy
images: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-dummy
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v6
Expand All @@ -152,5 +155,5 @@ jobs:
file: ./${{matrix.os.dir}}/Dockerfile-sim
build-args: |
VERSION=${{ steps.meta.outputs.version }}
REPOSITORY=ghcr.io/${{env.OWNER_LC}}
tags: ghcr.io/${{env.OWNER_LC}}/mucoll-sim:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}
REPOSITORY=${{ env.REGISTRY }}/${{env.OWNER_LC}}
tags: ${{ env.REGISTRY }}/${{env.OWNER_LC}}/mucoll-sim:${{steps.meta.outputs.version}}-${{matrix.os.suffix}}

0 comments on commit 2134877

Please sign in to comment.