-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (69 loc) · 2.34 KB
/
Copy pathrelease.yml
File metadata and controls
78 lines (69 loc) · 2.34 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
name: Release
on:
push:
branches: [main]
permissions:
contents: write
issues: write
pull-requests: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
outputs:
new-release-published: ${{ steps.semantic.outputs.new-release-published }}
release-version: ${{ steps.semantic.outputs.release-version }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-node@v7
with:
node-version: "lts/*"
- run: npm install -g semantic-release@25.0.9 conventional-changelog-conventionalcommits@8.0.0 @semantic-release/exec@7.1.0
- name: Create Release
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
docker:
needs: release
if: ${{ needs.release.outputs.new-release-published == 'true' }}
uses: ./.github/workflows/docker-publish.yml
with:
version: ${{ needs.release.outputs.release-version }}
secrets: inherit
promote-staging:
needs:
- release
- docker
if: ${{ needs.release.outputs.new-release-published == 'true' }}
uses: glitchedmob/infra-gha/.github/workflows/kustomize-image-pr.yml@v0.11.3
with:
deployment-repository: sgfdevs/infra-k8s-apps
kustomization-path: src/k8s/apps/methodconf.com/staging
image: ghcr.io/sgfdevs/methodconf.com
image-tag: ${{ needs.release.outputs.release-version }}
source-ref: v${{ needs.release.outputs.release-version }}
promotion-id: staging
auto-merge: true
github-app-id: "4527359"
secrets:
github-app-private-key: ${{ secrets.INFRA_AUTOMATION_APP_PRIVATE_KEY }}
promote-production:
needs:
- release
- docker
- promote-staging
if: ${{ needs.release.outputs.new-release-published == 'true' }}
uses: glitchedmob/infra-gha/.github/workflows/kustomize-image-pr.yml@v0.11.3
with:
deployment-repository: sgfdevs/infra-k8s-apps
kustomization-path: src/k8s/apps/methodconf.com/production
image: ghcr.io/sgfdevs/methodconf.com
image-tag: ${{ needs.release.outputs.release-version }}
source-ref: v${{ needs.release.outputs.release-version }}
promotion-id: production
github-app-id: "4527359"
secrets:
github-app-private-key: ${{ secrets.INFRA_AUTOMATION_APP_PRIVATE_KEY }}