-
Notifications
You must be signed in to change notification settings - Fork 18
96 lines (78 loc) · 2.57 KB
/
release.yaml
File metadata and controls
96 lines (78 loc) · 2.57 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
name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.26"
- name: Release
id: semantic-release
uses: googleapis/release-please-action@v4
with:
release-type: simple
token: ${{ secrets.GH_TOKEN }}
- name: Tag Images
if: ${{ steps.semantic-release.outputs.release_created }}
run: |
VERSION=${{ steps.semantic-release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
build-app:
name: Build API App
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/api
dockerfile: apps/api/Dockerfile
platform: "linux/amd64"
tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ needs.release.outputs.tag_name }}
type=raw,value=latest
build-web:
name: Build Web App
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/web
dockerfile: apps/web/Dockerfile
platform: "linux/amd64"
tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ needs.release.outputs.tag_name }}
type=raw,value=latest
build-workspace-engine:
name: Build Workspace Engine
needs: release
if: ${{ needs.release.outputs.release_created }}
uses: ./.github/workflows/build-image.yaml
secrets: inherit
with:
image-name: ctrlplane/workspace-engine
dockerfile: apps/workspace-engine/Dockerfile
platform: "linux/amd64"
tags: |
type=semver,pattern={{version}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.tag_name }}
type=semver,pattern={{major}},value=${{ needs.release.outputs.tag_name }}
type=raw,value=latest