-
Notifications
You must be signed in to change notification settings - Fork 12
93 lines (84 loc) · 2.92 KB
/
docker.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
on:
workflow_dispatch:
name: Docker images
env:
REGISTRY: ghcr.io
jobs:
build-images:
name: Build & push Docker images
runs-on: ubuntu-latest
strategy:
matrix:
runtime:
- name: gtk-nightly
gtktag: main
adwtag: main
- name: gtk-4.6
gtktag: 4.6.3
adwtag: 1.1.1
- name: gtk-4.8
gtktag: 4.8.2
adwtag: 1.2.0
- name: gtk-4.10
gtktag: 4.10.0
adwtag: 1.3.2
- name: gtk-4.12
gtktag: 4.12.4
adwtag: 1.3.6
fail-fast: false
steps:
- name: Checkout
uses: actions/[email protected]
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Repository
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
mglolenstine/gtk4-cross
ghcr.io/mglolenstine/gtk4-cross
tags: |
${{ matrix.runtime.name }}
- name: Write the Dockerfile for the ${{ matrix.runtime.name }} runtime
run: |
sed -i 's/%GTKTAG%/${{matrix.runtime.gtktag}}/g' gtk4-cross-base-hub/Dockerfile && sed -i 's/%ADWTAG%/${{matrix.runtime.adwtag}}/g' gtk4-cross-base-hub/Dockerfile
- name: Build & push the ${{ matrix.runtime.name }} image to Docker Hub
uses: docker/[email protected]
continue-on-error: false
with:
context: ./gtk4-cross-base-hub
file: ./gtk4-cross-base-hub/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Extract metadata (tags, labels) for Docker
id: meta_rust
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
mglolenstine/gtk4-cross
ghcr.io/mglolenstine/gtk4-cross
tags: |
rust-${{ matrix.runtime.name }}
- name: Write the Dockerfile for the ${{ matrix.runtime.name }} runtime
run: |
sed -i 's/%GTKTAG%/${{matrix.runtime.name}}/g' gtk4-cross-rust/Dockerfile
- name: Build & push the rust-${{ matrix.runtime.name }} image to Docker Hub
uses: docker/[email protected]
continue-on-error: false
with:
context: ./gtk4-cross-rust
file: ./gtk4-cross-rust/Dockerfile
push: true
tags: ${{ steps.meta_rust.outputs.tags }}
labels: ${{ steps.meta_rust.outputs.labels }}