-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 1.82 KB
/
build_ci_containers.yml
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
name: Build and push CI containers
on: workflow_dispatch
permissions:
contents: read
checks: write
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ debian_latest, ubuntu_latest, arch, fedora ]
variant: [ run_base ]
arch: [ x86_64 ]
include:
- os: debian_bullseye
variant: build_base
arch: x86_64
- os: debian_bullseye
variant: build_base
arch: arm64
- os: debian_latest
variant: run_base
arch: arm64
- os: ubuntu_latest
variant: run_base
arch: arm64
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Prepare tag name
run: |
echo "UNIQUETAG=$(date +"%Y%m%d")_git_$(git rev-parse HEAD | cut -c1-8)" | tee -a $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push builder
uses: docker/build-push-action@v4
with:
context: distribution
file: distribution/dockerfiles/${{ matrix.variant }}_${{ matrix.os }}.Dockerfile
push: true
platforms: linux/${{ matrix.arch }}
build-args: |
architecture=${{ matrix.arch }}
tags: |
sandervocke/shoopdaloop_${{ matrix.variant }}_${{ matrix.os }}_${{ matrix.arch }}:latest
sandervocke/shoopdaloop_${{ matrix.variant }}_${{ matrix.os }}_${{ matrix.arch }}:${{ env.UNIQUETAG }}