-
-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (83 loc) · 3.07 KB
/
update-docker-all.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
# ----------------------------------------------------------------------------
# GitHub Actions workflow that updates all Docker images of Castle Game Engine:
#
# - cge-none (prerequisites, like FPC (stable versuib),
# Android SDK/NDK, texture tools...),
# - cge-none-fpxXXX (same as cge-none but with alternative FPC version,
# see https://hub.docker.com/r/kambi/castle-engine-cloud-builds-tools/ )
# - cge-stable, cge-unstable
#
# See https://castle-engine.io/docker for more about this Docker image.
# ----------------------------------------------------------------------------
name: Update All CGE Docker Images
on:
push:
pull_request:
# Allow to manually trigger the workflow.
workflow_dispatch:
defaults:
run:
shell: bash
# Split build.sh into 3 smaller jobs,
# to avoid "disk size exceeded" errors from GH actions on GH-hosted runners.
# As a bonus: build-stable and build-unstable can run in parallel.
jobs:
build-none:
name: Build cge-none, cge-none-fpxXXX
# Since we upload Docker images in this job (and the Docker images are
# not tagged with GitHub branch) we should not run this on every branch.
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: cge-none, cge-none-fpxXXX
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_GITHUB_USER: ${{ secrets.DOCKER_GITHUB_USER }}
DOCKER_GITHUB_TOKEN: ${{ secrets.DOCKER_GITHUB_TOKEN }}
run: |
set -euo pipefail
IFS=$'\n\t'
source build-common.sh
do_everything_for_image_none
build-stable:
name: Build stable
# Since we upload Docker images in this job (and the Docker images are
# not tagged with GitHub branch) we should not run this on every branch.
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
needs: [build-none]
steps:
- uses: actions/checkout@v4
- name: cge-stable
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_GITHUB_USER: ${{ secrets.DOCKER_GITHUB_USER }}
DOCKER_GITHUB_TOKEN: ${{ secrets.DOCKER_GITHUB_TOKEN }}
run: |
set -euo pipefail
IFS=$'\n\t'
source build-common.sh
do_everything_for_image_stable
build-unstable:
name: Build cge-unstable
# Since we upload Docker images in this job (and the Docker images are
# not tagged with GitHub branch) we should not run this on every branch.
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
needs: [build-none]
steps:
- uses: actions/checkout@v4
- name: cge-unstable
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_GITHUB_USER: ${{ secrets.DOCKER_GITHUB_USER }}
DOCKER_GITHUB_TOKEN: ${{ secrets.DOCKER_GITHUB_TOKEN }}
run: |
set -euo pipefail
IFS=$'\n\t'
source build-common.sh
do_everything_for_image_unstable