-
Notifications
You must be signed in to change notification settings - Fork 99
63 lines (56 loc) · 2.01 KB
/
bump-version.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Bump version - wazuh-packages
on:
workflow_dispatch:
inputs:
version:
description: 'Version to bump to'
required: true
revision:
description: 'Revision to bump to. Defalut: 1'
required: false
date:
description: 'Date to bump to. Default: today'
required: false
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
# - uses: peterjgrainger/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# branch: bump-version-${{ event.inputs.version }}
# sha: ${{ github.head_ref }}
# - uses: actions/checkout@v3
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# ref: bump-version-${{ event.inputs.version }}
# - name: Set execution parameters
# run: |
# EXEC_PARAMS=""
# if [ -n "${{ github.event.inputs.version }}" ]; then
# echo "EXEC_PARAMS=EXEC_PARAMS+\" -v ${{ github.event.inputs.version }}\""
# fi
# if [ -n "${{ github.event.inputs.revision }}" ]; then
# echo "EXEC_PARAMS=EXEC_PARAMS+\" -r ${{ github.event.inputs.revision }}\""
# fi
# if [ -n "${{ github.event.inputs.date }}" ]; then
# echo "EXEC_PARAMS=EXEC_PARAMS+\" -d ${{ github.event.inputs.date }}\""
# fi
# echo "EXEC_PARAMS" >> $GITHUB_ENV
# shell: bash
# - name: Bump version
# run: |
# python3 ./bump_version.py $EXEC_PARAMS
# shell: bash
# - name: "Commit changes and push"
# run: |
# git config --global user.name "wazuhci"
# git config --global user.email "[email protected]"
# git add .
# git commit -m "Bump version to ${{ github.event.inputs.version }}"
# shell: bash