-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.76 KB
/
build-deploy-flux-core.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: flux-arm build-deploy-flux-core
on:
# This must be triggered manually
workflow_dispatch:
# Uncomment this if you want to test on a pull request
# This take 1 hour 30-40 minutes
# pull_request: []
# This is for base containers
# This installs up to pmix, but no flux stuff
env:
container: ghcr.io/rse-ops/flux-arm-core
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
fail-fast: false
matrix:
platform:
- [linux/arm64/v8, armv8]
- [linux/arm64, arm64]
- [linux/ppc64le, ppc64le]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.container }}
- name: Make Space For Build
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.platform[0] }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login GitHub packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: build
uses: docker/build-push-action@v3
with:
file: Dockerfile.flux-core
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: ${{ matrix.platform[0] }}
build-args: |
tag=${{ matrix.platform[1] }}
tags: |
${{ env.container }}:${{ matrix.platform[1] }}