-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (85 loc) · 2.61 KB
/
docker.yaml
File metadata and controls
101 lines (85 loc) · 2.61 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
name: Build and Push Docker Images
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build-and-push-bun:
name: Build and Push Bun Image
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Generate Docker tags (Bun)
id: tags-bun
run: |
TAGS=$(bun scripts/gen-container-img-tags.ts bun)
echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Build and push Docker image (Bun)
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.tags-bun.outputs.tags }}
# platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=bun
cache-to: type=gha,mode=max,scope=bun
build-and-push-node:
name: Build and Push Node Image
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Generate Docker tags (Node)
id: tags-node
run: |
TAGS=$(bun scripts/gen-container-img-tags.ts node)
echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Build and push Docker image (Node)
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.node
push: true
tags: ${{ steps.tags-node.outputs.tags }}
# platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=node
cache-to: type=gha,mode=max,scope=node
release:
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build-and-push-bun, build-and-push-node]
steps:
- uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: RELEASE_NOTES.md
prerelease: ${{ contains(github.ref_name, '-') }}