|
7 | 7 | # Our repo name contains upper case characters, so we can't use ${{ github.repository }}
|
8 | 8 | IMAGE_NAME: exago
|
9 | 9 | USERNAME: exago-bot
|
10 |
| - BASE_VERSION: ubuntu-24.04-fortran |
11 |
| - SPACK_CACHE: /opt/spack-cache |
12 |
| - tempdir: /opt/spack-cache |
13 |
| - TMP: /opt/spack-cache |
14 |
| - TMPDIR: /opt/spack-cache |
| 10 | + BASE_VERSION: ubuntu-24.04-fortran-v0.0.1 |
15 | 11 |
|
16 | 12 | # Until we remove the need to clone submodules to build, this should on be in PRs
|
17 | 13 | on: [pull_request]
|
18 | 14 |
|
19 | 15 | jobs:
|
20 | 16 | base_image_build:
|
| 17 | + name: Build Custom Base Image |
21 | 18 | runs-on: ubuntu-24.04
|
22 | 19 | permissions:
|
23 |
| - packages: write |
24 | 20 | contents: read
|
25 |
| - |
26 |
| - name: Build Custom Base Image |
| 21 | + packages: write |
27 | 22 | steps:
|
28 | 23 | - name: Checkout
|
29 | 24 | uses: actions/checkout@v4
|
|
52 | 47 | > /dev/null && echo "Image already exists. Please bump version." && exit 0
|
53 | 48 | echo "IMAGE_EXISTS=false" >> $GITHUB_ENV
|
54 | 49 |
|
| 50 | + # https://docs.github.com/en/actions/publishing-packages/publishing-docker-images |
| 51 | + - name: Log in to the Container registry |
| 52 | + uses: docker/login-action@v3 |
| 53 | + with: |
| 54 | + registry: ${{ env.REGISTRY }} |
| 55 | + username: ${{ env.USERNAME }} |
| 56 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 57 | + |
55 | 58 | # Need to build custom base image with gfortran
|
56 | 59 | - name: Create Dockerfile heredoc
|
57 | 60 | if: ${{ env.IMAGE_EXISTS == 'false' }}
|
|
73 | 76 | && rm -rf /var/lib/apt/lists/*
|
74 | 77 | EOF
|
75 | 78 |
|
76 |
| - # https://docs.github.com/en/actions/publishing-packages/publishing-docker-images |
77 |
| - - name: Log in to the Container registry |
78 |
| - uses: docker/login-action@v3 |
79 |
| - with: |
80 |
| - registry: ${{ env.REGISTRY }} |
81 |
| - username: ${{ env.USERNAME }} |
82 |
| - password: ${{ secrets.GITHUB_TOKEN }} |
83 |
| - |
84 | 79 | - name: Extract metadata (tags, labels) for Docker
|
85 | 80 | if: ${{ env.IMAGE_EXISTS == 'false' }}
|
86 | 81 | id: meta
|
|
104 | 99 | permissions:
|
105 | 100 | packages: write
|
106 | 101 | contents: read
|
| 102 | + timeout-minutes: 30 |
107 | 103 |
|
108 | 104 | strategy:
|
109 | 105 | matrix:
|
@@ -143,15 +139,12 @@ jobs:
|
143 | 139 | concretizer:
|
144 | 140 | reuse: dependencies
|
145 | 141 | config:
|
146 |
| - source_cache: $SPACK_CACHE/source_cache |
147 |
| - misc_cache: $SPACK_CACHE/misc_cache |
148 |
| - build_stage: $SPACK_CACHE/build_stage |
149 | 142 | install_tree:
|
150 | 143 | root: /opt/spack
|
151 | 144 | padded_length: False
|
152 | 145 | mirrors:
|
153 | 146 | local-buildcache: oci://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
154 |
| - # spack: https://binaries.spack.io/develop |
| 147 | + spack: https://binaries.spack.io/develop |
155 | 148 | packages:
|
156 | 149 | all:
|
157 | 150 | require: "%gcc"
|
|
0 commit comments