Skip to content

Commit 3c960e6

Browse files
committed
Cleanup GI actions setup.
1 parent 781d72a commit 3c960e6

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

.github/workflows/spack_cpu_build.yaml

+13-20
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,18 @@ env:
77
# Our repo name contains upper case characters, so we can't use ${{ github.repository }}
88
IMAGE_NAME: exago
99
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
1511

1612
# Until we remove the need to clone submodules to build, this should on be in PRs
1713
on: [pull_request]
1814

1915
jobs:
2016
base_image_build:
17+
name: Build Custom Base Image
2118
runs-on: ubuntu-24.04
2219
permissions:
23-
packages: write
2420
contents: read
25-
26-
name: Build Custom Base Image
21+
packages: write
2722
steps:
2823
- name: Checkout
2924
uses: actions/checkout@v4
@@ -52,6 +47,14 @@ jobs:
5247
> /dev/null && echo "Image already exists. Please bump version." && exit 0
5348
echo "IMAGE_EXISTS=false" >> $GITHUB_ENV
5449
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+
5558
# Need to build custom base image with gfortran
5659
- name: Create Dockerfile heredoc
5760
if: ${{ env.IMAGE_EXISTS == 'false' }}
@@ -73,14 +76,6 @@ jobs:
7376
&& rm -rf /var/lib/apt/lists/*
7477
EOF
7578
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-
8479
- name: Extract metadata (tags, labels) for Docker
8580
if: ${{ env.IMAGE_EXISTS == 'false' }}
8681
id: meta
@@ -104,6 +99,7 @@ jobs:
10499
permissions:
105100
packages: write
106101
contents: read
102+
timeout-minutes: 30
107103

108104
strategy:
109105
matrix:
@@ -143,15 +139,12 @@ jobs:
143139
concretizer:
144140
reuse: dependencies
145141
config:
146-
source_cache: $SPACK_CACHE/source_cache
147-
misc_cache: $SPACK_CACHE/misc_cache
148-
build_stage: $SPACK_CACHE/build_stage
149142
install_tree:
150143
root: /opt/spack
151144
padded_length: False
152145
mirrors:
153146
local-buildcache: oci://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
154-
# spack: https://binaries.spack.io/develop
147+
spack: https://binaries.spack.io/develop
155148
packages:
156149
all:
157150
require: "%gcc"

0 commit comments

Comments
 (0)