-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (44 loc) · 1.35 KB
/
deploy.yml
File metadata and controls
51 lines (44 loc) · 1.35 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
name: Deploy
on:
workflow_run:
branches:
- master
workflows:
- Publish Helm Chart
types:
- completed
permissions:
contents: write
actions: read
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download chart version artifact
uses: actions/download-artifact@v4
with:
name: chart-version
path: ./
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}
- name: Set version from image tag
id: version
run: |
CHART_VERSION=$(cat chart-version.txt)
echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_OUTPUT
echo "Dispatching chart version: ${CHART_VERSION}"
- name: Create app token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: 2509722
private-key: ${{ secrets.GITOPS_APP_PRIVATE_KEY }}
owner: 4sgard-dev
- name: Trigger GitOps update
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.app-token.outputs.token }}
repository: 4sgard-dev/asgard-k8s-ops
event-type: update-shitpostbot-chart
client-payload: '{"chart_version": "${{ steps.version.outputs.chart_version }}"}'