Skip to content

Commit ca66f80

Browse files
committed
.github: group cleanup jobs by runner, notify after e2e
1 parent c419785 commit ca66f80

4 files changed

Lines changed: 428 additions & 355 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: build bare metal maintenance image
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
GITHUB_TOKEN_IN:
7+
required: true
8+
CACHIX_AUTH_TOKEN:
9+
required: true
10+
outputs:
11+
image:
12+
description: "Pushed cleanup-bare-metal image reference"
13+
value: ${{ jobs.build-image.outputs.image }}
14+
15+
env:
16+
container_registry: ghcr.io/edgelesssys
17+
18+
jobs:
19+
build-image:
20+
name: "Build cleanup-bare-metal image"
21+
runs-on: ubuntu-24.04
22+
permissions:
23+
contents: read
24+
packages: write
25+
outputs:
26+
image: "${{ steps.build.outputs.image }}"
27+
env:
28+
SET: base
29+
steps:
30+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+
with:
32+
persist-credentials: false
33+
- uses: ./.github/actions/setup_nix
34+
with:
35+
githubToken: ${{ secrets.GITHUB_TOKEN_IN || secrets.GITHUB_TOKEN }}
36+
cachixToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
37+
- uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
38+
- name: Log in to ghcr.io Container registry
39+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
40+
with:
41+
registry: ghcr.io
42+
username: ${{ github.actor }}
43+
password: ${{ secrets.GITHUB_TOKEN_IN || secrets.GITHUB_TOKEN }}
44+
- name: Create justfile.env
45+
run: |
46+
cat <<EOF > justfile.env
47+
container_registry=${{ env.container_registry }}
48+
set=${SET}
49+
EOF
50+
- name: Build and push cleanup-bare-metal image
51+
id: build
52+
env:
53+
ghcr: ${{ env.container_registry }}
54+
run: |
55+
just push cleanup-bare-metal
56+
image=$(sed -n "s#${{ env.container_registry }}/contrast/cleanup-bare-metal:latest=##p" ./workspace/just.containerlookup)
57+
echo "image=${image}" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)