-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 2.44 KB
/
docker.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
name: Docker
on:
workflow_call:
jobs:
build:
strategy:
matrix:
include:
- node_version: 22
latest: true
lts: true
- node_version: 20
latest: false
lts: false
- node_version: 18
latest: false
lts: false
env:
debian_version: bookworm
postgresql_version: 17
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build the base image
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
build-args: |
DEBIAN_VERSION=${{ env.debian_version }}
NODE_VERSION=${{ matrix.node_version }}
POSTGRESQL_VERSION=${{ env.postgresql_version }}
tags: |
ghcr.io/tweedegolf/node:${{matrix.node_version}}
${{ matrix.latest && 'ghcr.io/tweedegolf/node:latest' || '' }}
${{ matrix.lts && 'ghcr.io/tweedegolf/node:lts' || '' }}
- name: Build the extended image
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
file: Dockerfile-extended
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
build-args: |
DEBIAN_VERSION=${{ env.debian_version }}
NODE_VERSION=${{ matrix.node_version }}
tags: |
ghcr.io/tweedegolf/node:${{matrix.node_version}}-extended
${{ matrix.latest && 'ghcr.io/tweedegolf/node:latest-extended' || '' }}
${{ matrix.lts && 'ghcr.io/tweedegolf/node:lts-extended' || '' }}
- name: Build the full image
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
file: Dockerfile-full
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
build-args: |
DEBIAN_VERSION=${{ env.debian_version }}
NODE_VERSION=${{ matrix.node_version }}
tags: |
ghcr.io/tweedegolf/node:${{matrix.node_version}}-full
${{ matrix.latest && 'ghcr.io/tweedegolf/node:latest-full' || '' }}
${{ matrix.lts && 'ghcr.io/tweedegolf/node:lts-full' || '' }}