48 lines (38 loc) · 1.22 KB
/
build-images.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
name: Build & Publish
on:
push:
branches: [ master ]
jobs:
worker:
runs-on: ubuntu-latest
strategy:
# some builds might fail, continue if that happens
fail-fast: false
# can be tweaked depending on image layer reuse in parallel builds
max-parallel: 2
matrix:
QT_VERSION:
- 5.9.5
- 5.13.2
- 5.14.2
- 5.15.0
env:
IMAGE_NAME: "linuxdeployqt:${{ matrix.QT_VERSION }}"
GITHUB_IMAGE_NAME: "docker.pkg.github.com/mhitza/docker-linuxdeployqt/linuxdeployqt:${{ matrix.QT_VERSION }}"
steps:
- uses: actions/checkout@v2
- name: pull existing image from GitHub packages
run: |
docker pull ${{ env.GITHUB_IMAGE_NAME }} || true
- name: build
run: |
docker build \
--build-arg QT_VERSION=${{ matrix.QT_VERSION }} \
-t ${{ env.IMAGE_NAME }} \
.
- name: push to GitHub packages
run: |
echo ${{ secrets.GITHUB_TOKEN }} \
| docker login https://docker.pkg.github.com -u mhitza --password-stdin
docker tag ${{ env.IMAGE_NAME }} ${{ env.GITHUB_IMAGE_NAME }}
docker push ${{ env.GITHUB_IMAGE_NAME }}