Skip to content

Commit f6ce24e

Browse files
authored
fix: restore github actions build chain
1 parent b005514 commit f6ce24e

File tree

1 file changed

+37
-107
lines changed

1 file changed

+37
-107
lines changed

.github/workflows/build-push.yml

Lines changed: 37 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -60,71 +60,6 @@ jobs:
6060
BUILD_IMAGE: debian_stable_base
6161
PLATFORM: linux/amd64
6262
steps:
63-
- name: Checkout
64-
uses: actions/checkout@v4
65-
- name: Set up QEMU
66-
uses: docker/setup-qemu-action@v3
67-
with:
68-
platforms: linux/amd64,linux/arm64
69-
- name: Set up Docker Buildx
70-
uses: docker/setup-buildx-action@v3
71-
- name: Docker meta
72-
id: meta
73-
uses: docker/metadata-action@v5
74-
with:
75-
images: |
76-
name=${{ env.DH_REGISTRY }}/${{ env.DH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }},enable=${{ env.DH_PUSH != 0 }}
77-
name=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }},enable=${{ env.GH_PUSH != 0 }}
78-
tags: |
79-
${{ env.INTERNAL_TAG }}
80-
type=schedule
81-
type=ref,prefix=unstable-pr-,event=pr
82-
- name: Login to Docker Hub
83-
uses: docker/login-action@v3
84-
if: ${{ env.DH_PUSH == '1' }}
85-
with:
86-
registry: ${{ env.DH_REGISTRY }}
87-
username: ${{ env.DH_REGISTRY_USER }}
88-
password: ${{ secrets.DH_EICWEB_TOKEN }}
89-
- name: Login to GitHub Container Registry
90-
uses: docker/login-action@v3
91-
if: ${{ env.GH_PUSH == '1' }}
92-
with:
93-
registry: ${{ env.GH_REGISTRY }}
94-
username: ${{ secrets.GHCR_REGISTRY_USER }}
95-
password: ${{ secrets.GHCR_REGISTRY_TOKEN }}
96-
- name: Build and push
97-
uses: docker/build-push-action@v5
98-
with:
99-
file: containers/debian/base.Dockerfile
100-
context: containers/debian
101-
platforms: ${{ matrix.PLATFORM }}
102-
push: true
103-
tags: ${{ steps.meta.outputs.tags }}
104-
labels: ${{ steps.meta.outputs.labels }}
105-
build-args: |
106-
BASE_IMAGE=${{ matrix.BASE_IMAGE }}
107-
BUILD_IMAGE=${{ matrix.BUILD_IMAGE }}
108-
cache-from: type=gha,scope=${{ github.workflow }}
109-
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
110-
111-
dev:
112-
runs-on: ubuntu-latest
113-
needs: base
114-
strategy:
115-
matrix:
116-
include:
117-
- BUILDER_IMAGE: debian_stable_base
118-
RUNTIME_IMAGE: debian_stable_base
119-
BUILD_IMAGE: dev
120-
PLATFORM: linux/amd64
121-
ENV: dev
122-
steps:
123-
- name: Free Disk Space (Ubuntu)
124-
uses: jlumbroso/[email protected]
125-
with:
126-
android: true
127-
dotnet: true
12863
- name: Checkout
12964
uses: actions/checkout@v4
13065
- name: Load spack version and cherry-picks
@@ -148,38 +83,23 @@ jobs:
14883
source eic-spack.sh
14984
echo "orgrepo=${EICSPACK_ORGREPO}" | tee -a $GITHUB_OUTPUT
15085
echo "version=${EICSPACK_VERSION}" | tee -a $GITHUB_OUTPUT
151-
- name: Load secrets into mirrors.yaml
152-
id: mirrors
153-
run: |
154-
source spack.sh
155-
export SPACK_VERSION
156-
export CI_REGISTRY=ghcr.io
157-
export CI_PROJECT_PATH=eic
158-
export CI_REGISTRY_USER=${{ secrets.GHCR_REGISTRY_USER }}
159-
export CI_REGISTRY_PASSWORD=${{ secrets.GHCR_REGISTRY_TOKEN }}
160-
export GITHUB_REGISTRY_USER=${{ secrets.GHCR_REGISTRY_USER }}
161-
export GITHUB_REGISTRY_TOKEN=${{ secrets.GHCR_REGISTRY_TOKEN }}
162-
export S3RW_ACCESS_KEY=${{ secrets.S3RW_ACCESS_KEY }}
163-
export S3RW_SECRET_KEY=${{ secrets.S3RW_SECRET_KEY }}
164-
cat mirrors.yaml.in | envsubst > mirrors.yaml
16586
- name: Set up QEMU
16687
uses: docker/setup-qemu-action@v3
16788
with:
168-
platforms: linux/amd64
89+
platforms: linux/amd64,linux/arm64
16990
- name: Set up Docker Buildx
17091
uses: docker/setup-buildx-action@v3
17192
- name: Docker meta
17293
id: meta
17394
uses: docker/metadata-action@v5
17495
with:
17596
images: |
176-
name=${{ env.DH_REGISTRY }}/${{ env.DH_REGISTRY_USER }}/eic_${{ matrix.BUILD_IMAGE }},enable=${{ env.DH_PUSH != 0 }}
177-
name=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/eic_${{ matrix.BUILD_IMAGE }},enable=${{ env.GH_PUSH != 0 }}
97+
name=${{ env.DH_REGISTRY }}/${{ env.DH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }},enable=${{ env.DH_PUSH != 0 }}
98+
name=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }},enable=${{ env.GH_PUSH != 0 }}
17899
tags: |
179100
${{ env.INTERNAL_TAG }}
180-
type=schedule,pattern={{date 'YYYY-MM-DD'}}
101+
type=schedule
181102
type=ref,prefix=unstable-pr-,event=pr
182-
type=match,pattern=^v(\d+\.\d+\.\d+-.*)$,group=1
183103
- name: Login to Docker Hub
184104
uses: docker/login-action@v3
185105
if: ${{ env.DH_PUSH == '1' }}
@@ -197,22 +117,15 @@ jobs:
197117
- name: Build and push
198118
uses: docker/build-push-action@v5
199119
with:
200-
file: containers/jug/dev.Dockerfile
201-
context: containers/jug
202-
build-contexts: |
203-
spack-environment=spack-environment
204-
secret-files: |
205-
mirrors=mirrors.yaml
120+
file: containers/debian/Dockerfile
121+
context: containers/debian
206122
platforms: ${{ matrix.PLATFORM }}
207123
push: true
208124
tags: ${{ steps.meta.outputs.tags }}
209125
labels: ${{ steps.meta.outputs.labels }}
210126
build-args: |
211-
DOCKER_REGISTRY=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/
212-
BUILDER_IMAGE=${{ matrix.BUILDER_IMAGE }}
213-
RUNTIME_IMAGE=${{ matrix.RUNTIME_IMAGE }}
214-
BUILD_IMAGE=eic_${{ matrix.BUILD_IMAGE }}
215-
INTERNAL_TAG=${{ env.INTERNAL_TAG }}
127+
BASE_IMAGE=${{ matrix.BASE_IMAGE }}
128+
BUILD_IMAGE=${{ matrix.BUILD_IMAGE }}
216129
SPACK_ORGREPO=${{ steps.spack.outputs.orgrepo }}
217130
SPACK_VERSION=${{ steps.spack.outputs.version }}
218131
SPACK_CHERRYPICKS=${{ steps.spack.outputs.cherrypicks }}
@@ -223,20 +136,21 @@ jobs:
223136
EICSPACK_VERSION=${{ steps.eic-spack.outputs.version }}
224137
KEY4HEPSPACK_ORGREPO=${{ steps.key4hep-spack.outputs.orgrepo }}
225138
KEY4HEPSPACK_VERSION=${{ steps.key4hep-spack.outputs.version }}
226-
S3_ACCESS_KEY=${{ secrets.S3_ACCESS_KEY }}
227-
S3_SECRET_KEY=${{ secrets.S3_SECRET_KEY }}
228139
jobs=${{ env.JOBS }}
229140
cache-from: type=gha,scope=${{ github.workflow }}
230141
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
231142

232-
xl:
143+
eic:
233144
runs-on: ubuntu-latest
234-
needs: dev
145+
needs: base
235146
strategy:
236147
matrix:
237148
include:
238-
- BASE_IMAGE: dev
239-
BUILD_IMAGE: xl
149+
- BUILD_IMAGE: eic_
150+
ENV: xl
151+
BUILD_TYPE: default
152+
BUILDER_IMAGE: debian_stable_base
153+
RUNTIME_IMAGE: debian_stable_base
240154
PLATFORM: linux/amd64
241155
steps:
242156
- name: Free Disk Space (Ubuntu)
@@ -246,6 +160,18 @@ jobs:
246160
dotnet: true
247161
- name: Checkout
248162
uses: actions/checkout@v4
163+
- name: Load secrets into mirrors.yaml
164+
id: mirrors
165+
run: |
166+
source spack.sh
167+
export SPACK_VERSION
168+
export CI_REGISTRY=ghcr.io
169+
export CI_PROJECT_PATH=eic
170+
export CI_REGISTRY_USER=${{ secrets.GHCR_REGISTRY_USER }}
171+
export CI_REGISTRY_PASSWORD=${{ secrets.GHCR_REGISTRY_TOKEN }}
172+
export GITHUB_REGISTRY_USER=${{ secrets.GHCR_REGISTRY_USER }}
173+
export GITHUB_REGISTRY_TOKEN=${{ secrets.GHCR_REGISTRY_TOKEN }}
174+
cat mirrors.yaml.in | envsubst > mirrors.yaml
249175
- name: Set up QEMU
250176
uses: docker/setup-qemu-action@v3
251177
with:
@@ -257,8 +183,8 @@ jobs:
257183
uses: docker/metadata-action@v5
258184
with:
259185
images: |
260-
name=${{ env.DH_REGISTRY }}/${{ env.DH_REGISTRY_USER }}/eic_${{ matrix.BUILD_IMAGE }},enable=${{ env.DH_PUSH != 0 }}
261-
name=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/eic_${{ matrix.BUILD_IMAGE }},enable=${{ env.GH_PUSH != 0 }}
186+
name=${{ env.DH_REGISTRY }}/${{ env.DH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }},enable=${{ env.DH_PUSH != 0 }}
187+
name=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/${{ matrix.BUILD_IMAGE }}${{ matrix.ENV }},enable=${{ env.GH_PUSH != 0 }}
262188
tags: |
263189
${{ env.INTERNAL_TAG }}
264190
type=schedule,pattern={{date 'YYYY-MM-DD'}}
@@ -281,19 +207,23 @@ jobs:
281207
- name: Build and push
282208
uses: docker/build-push-action@v5
283209
with:
284-
file: containers/jug/xl.Dockerfile
285-
context: containers/jug
210+
file: containers/eic/Dockerfile
211+
context: containers/eic
286212
build-contexts: |
287-
detectors=.
213+
spack-environment=spack-environment
214+
secret-files: |
215+
mirrors=mirrors.yaml
288216
platforms: ${{ matrix.PLATFORM }}
289217
push: true
290218
tags: ${{ steps.meta.outputs.tags }}
291219
labels: ${{ steps.meta.outputs.labels }}
292220
build-args: |
293221
DOCKER_REGISTRY=${{ env.GH_REGISTRY }}/${{ env.GH_REGISTRY_USER }}/
294-
BASE_IMAGE=eic_${{ matrix.BASE_IMAGE }}
222+
BUILDER_IMAGE=${{ matrix.BUILDER_IMAGE }}
223+
RUNTIME_IMAGE=${{ matrix.RUNTIME_IMAGE }}
295224
BUILD_IMAGE=eic_${{ matrix.BUILD_IMAGE }}
296225
INTERNAL_TAG=${{ env.INTERNAL_TAG }}
226+
ENV=${{ matrix.ENV }}
297227
jobs=${{ env.JOBS }}
298228
cache-from: type=gha,scope=${{ github.workflow }}
299229
cache-to: type=gha,mode=max,scope=${{ github.workflow }}

0 commit comments

Comments
 (0)