forked from cve-search/cve-search
-
Notifications
You must be signed in to change notification settings - Fork 40
37 lines (37 loc) · 1.02 KB
/
auto_version.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
35
36
37
name: Update web/VERSION
on:
pull_request:
types:
- closed
branches:
- master
jobs:
update-web-version:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Update version
run: |
python3 ./web/set_version.py
- name: Commit updated version
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add web/VERSION
git commit -m "Update web/VERSION $(cat web/VERSION)" -a || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: master
directory: .
github_token: ${{ secrets.VERSION_COMMIT_TOKEN }}