-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (35 loc) · 971 Bytes
/
autocommit.yml
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
name: Auto Commit
on:
push:
branches:
- main
- production
- kube-deploy
jobs:
run:
name: Auto Commit
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Update publish version
id: update
run: |
VERSION=${GITHUB_SHA::8}
if "$GITHUB_REF" == production; then
TYPE=production
else
TYPE=staging
fi
echo ::set-output name=VERSION::${VERSION}
# replace app.yaml with your app file name
sed -i "s|${TYPE}Tag:.*|${TYPE}Tag: $VERSION|g" helm/values.yaml
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions
add: '.'
message: "[ci skip] deploy from ${{ steps.update.outputs.VERSION }}"
signoff: true
# specify the branch you want to commit if need
# branch: main