-
Notifications
You must be signed in to change notification settings - Fork 57
53 lines (48 loc) · 1.42 KB
/
bake.yml
File metadata and controls
53 lines (48 loc) · 1.42 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
name: Bake Images
on:
schedule:
# Build images once a week, on Mondays
- cron: 0 8 * * 1
workflow_dispatch:
inputs:
environment:
type: choice
options:
- testing
- production
default: testing
description: "Choose the environment to bake the target for"
permissions: {}
jobs:
get_versions:
name: Get PostgreSQL versions
runs-on: ubuntu-24.04
permissions:
contents: read
outputs:
versions: ${{ steps.get_versions.outputs.versions }}
steps:
- name: Checkout Code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Get supported PostgreSQL versions
id: get_versions
run: |
VERSIONS="$(sed -n '/postgreSQL\(Versions\|PreviewVersions\) = \[/,/\]/ s/.*"\([0-9][0-9]*\)[.~][^"]*".*/\1/p' docker-bake.hcl | sort -nu | paste -sd,)"
echo "PostgreSQL versions: [$VERSIONS]"
echo "versions=[$VERSIONS]" >> "$GITHUB_OUTPUT"
Bake:
name: Bake
needs: get_versions
permissions:
packages: write
contents: read
id-token: write
security-events: write
strategy:
fail-fast: false
matrix:
version: ${{ fromJson(needs.get_versions.outputs.versions) }}
uses: ./.github/workflows/bake_targets.yml
with:
environment: ${{ github.event.inputs.environment }}
postgresql_version: ${{ matrix.version }}