-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 2.01 KB
/
update-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
# update version of jenkins plugins
# daily (pull-request with branch update-version)
name: update last-good-version
on:
schedule:
- cron: '0 19 * * *'
workflow_dispatch:
jobs:
update-version:
runs-on: ubuntu-latest
name: update version
steps:
- uses: actions/checkout@v4
- name: test jenkins-lts to get version
uses: ./
with:
dump-version-path: ${GITHUB_WORKSPACE}/.version
- name: update last-good-version
run: |
chmod +x update_version.sh
./update_version.sh .version
git status
git diff
- name: double check new last-good-version before commit
uses: ./
with:
version: last-good-version
- name: auto commit version update (for non-default branches)
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/main'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[bot] Update last good version"
file_pattern: last-good-version README.md src/plugins.txt
- name: Create Pull Request (for main branch)
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
title: "Update last good version"
body: "
Automated changes by [create-pull-request]\
(https://github.com/peter-evans/create-pull-request) GitHub action\n
Close and reopen PR to trigger status check tests, cf \
[triggering-further-workflow-runs]\
(https://github.com/peter-evans/create-pull-request/blob/main/\
docs/concepts-guidelines.md#triggering-further-workflow-runs)"
commit-message: "[bot] Update last good version"
committer: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
add-paths: last-good-version, README.md, src/plugins.txt
branch: create-pull-request/update-version
delete-branch: true