-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.02 KB
/
tag-and-deploy.yaml
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
name: Tag and Build
on:
push:
tags:
- '*'
jobs:
check-tag:
runs-on: christianbingman-com-runners
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
package.json
- name: Check version matches tag
run: |
[[ "$GITHUB_REF_NAME" == "$(jq -r .version package.json)" ]]
- name: Checkout helm repo
uses: actions/checkout@v4
with:
repository: ChristianBingman/christianbingman-com-helm
token: ${{ secrets.HELM_PAT }}
ref: main
path: chart
- name: Update app version
run: |
RELEASE_VERSION=$(jq -r .version package.json)
cd chart
sed -i -e "s/appVersion: \".\"*$/appVersion: \"$RELEASE_VERSION\"/g" Chart.yaml
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add Chart.yaml
git commit -m "Deploy [prod]"
git push