-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 2.48 KB
/
Copy pathbuild.yml
File metadata and controls
73 lines (68 loc) · 2.48 KB
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
name: Build Image
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
packages: write
jobs:
build:
runs-on: ${{ matrix.runner || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
include:
# asdf build-image is deprecated and not getting updated
#- image: asdf
# tag_suffix: ''
- image: mise
tag_suffix: ''
- image: node-playwright
tag_suffix: '-node-24.13'
args: '--build-arg NODE_VERSION=24.13.0'
- image: reticulum-builder
tag_suffix: '-ruby-3.4.7-amd64'
args: '--build-arg RUBY_VERSION=3.4.7'
runner: ubuntu-latest
- image: reticulum-builder
tag_suffix: '-ruby-3.4.7-arm64'
args: '--build-arg RUBY_VERSION=3.4.7'
runner: ubuntu-24.04-arm
- image: ruby-postgres
tag_suffix: '-ruby-3.4.7-postgres-18.3'
args: '--build-arg RUBY_VERSION=3.4.7 --build-arg POSTGRES_VERSION=18.3'
- image: telescopium-lint
tag_suffix: ''
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
image:
- 'build-images/${{ matrix.image }}.Dockerfile'
- 'build-images/${{ matrix.image }}/**'
- '.github/workflows/build.yml'
- run: >-
docker build
-t ghcr.io/code0-tech/build-images/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}${{ matrix.tag_suffix }}
-f build-images/${{ matrix.image }}.Dockerfile
${{ matrix.args }}
.
if: steps.filter.outputs.image == 'true'
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin ghcr.io
name: Login to registry
if: ${{ (github.event_name == 'push' && steps.filter.outputs.image == 'true') || github.event_name == 'workflow_dispatch' }}
- run: docker push ghcr.io/code0-tech/build-images/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}${{ matrix.tag_suffix }}
if: ${{ (github.event_name == 'push' && steps.filter.outputs.image == 'true') || github.event_name == 'workflow_dispatch' }}
require-all-images:
runs-on: ubuntu-latest
needs:
- build
if: ${{ always() }}
steps:
- name: Fail if any image build failed
if: ${{ needs.build.result != 'success' }}
run: exit 1