-
Notifications
You must be signed in to change notification settings - Fork 25
47 lines (42 loc) · 1.49 KB
/
Copy pathauto-version-bump.yaml
File metadata and controls
47 lines (42 loc) · 1.49 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
name: Bump version
on:
workflow_dispatch:
inputs:
version: # github.event.inputs.version
description: 'Release version ( e.g. "2.1.3")'
default: ""
required: true
jobs:
bump-version:
name: Bump version
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RELEASE_TAG: ${{github.event.inputs.VERSION}}
REPOSITORY: ${{github.repository}}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate sec-scanners-config
run: |
echo "Creating sec-scanners-config.yaml"
./tools/scripts/release/render-sec-scanners-config.sh ${RELEASE_TAG}
- name: Generate sec-scanners-config-release
run: |
echo "Creating sec-scanners-config-release.yaml"
./tools/scripts/release/render-sec-scanners-config-release.sh ${RELEASE_TAG}
- name: Check if generated sec-scanners-config differs and commit
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes found"
else
echo "Changes found. Commiting to repo"
echo "bumped sec-scanners-config.yaml to ${RELEASE_TAG}"
git config --global user.email "test@test.com"
git config --global user.name "Test Test"
git add ./sec-scanners-config.yaml
git commit -m "bumped sec-scanners-config.yaml to ${RELEASE_TAG}"
git push
fi