-
-
Notifications
You must be signed in to change notification settings - Fork 11
123 lines (107 loc) · 3.76 KB
/
Copy pathsnapshot.yaml
File metadata and controls
123 lines (107 loc) · 3.76 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: snapshot
# Build and publish snapshot (pre-release) Docker images.
# - Triggers: Scheduled daily and manual dispatch.
# - Runs on: Only the official repository (FirebirdSQL/firebird-docker)
#
# Snapshot images use tags like '6-snapshot', '5-snapshot', '4-snapshot'
# from the FirebirdSQL/snapshots GitHub repository.
#
# Multi-arch: each arch builds and pushes by digest, then a final job
# assembles a multi-arch manifest via `docker buildx imagetools create`.
on:
schedule:
- cron: "0 6 * * *" # Daily at 06:00 UTC
workflow_dispatch:
inputs:
branch:
description: 'Snapshot branch to build'
required: true
type: choice
options:
- master
- v5.0-release
- v4.0
default: master
# Only a single instance of this workflow can be in execution at a given time.
concurrency:
group: ${{ github.workflow }}
jobs:
build-snapshot:
if: ${{ github.repository == 'FirebirdSQL/firebird-docker' }}
strategy:
fail-fast: false
matrix:
branch: ${{ github.event_name == 'workflow_dispatch' && fromJSON(format('["{0}"]', inputs.branch)) || fromJSON('["master", "v5.0-release"]') }}
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
# Firebird 4.x has no linux-arm64 snapshot tarball (FirebirdSQL/snapshots
# ships Android arm64 only). Mirrors the FB3/FB4 amd64-only stable rule.
exclude:
- branch: v4.0
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Install tools
shell: pwsh
run: |
Install-Module InvokeBuild -Force
Install-Module PSFirebird -MinimumVersion '1.0.0' -Force
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push snapshot (by digest)
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Invoke-Build Build-Snapshot -Branch '${{ matrix.branch }}'
- name: Upload digest
uses: actions/upload-artifact@v7
with:
name: digests-snapshot-${{ matrix.branch }}-${{ matrix.arch }}
path: generated/digests-snapshot-*.json
if-no-files-found: error
retention-days: 1
create-manifests:
if: ${{ github.repository == 'FirebirdSQL/firebird-docker' }}
needs: build-snapshot
strategy:
fail-fast: false
matrix:
branch: ${{ github.event_name == 'workflow_dispatch' && fromJSON(format('["{0}"]', inputs.branch)) || fromJSON('["master", "v5.0-release"]') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download digests
uses: actions/download-artifact@v8
with:
path: generated
pattern: digests-snapshot-${{ matrix.branch }}-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Install tools
shell: pwsh
run: |
Install-Module InvokeBuild -Force
Install-Module PSFirebird -MinimumVersion '1.0.0' -Force
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Assemble multi-arch manifest
shell: pwsh
run: |
Invoke-Build Publish-Snapshot-Manifests -Branch '${{ matrix.branch }}'