forked from spidernet-io/spiderpool
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.45 KB
/
update-cniplugins-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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Update CniPlugin Version
permissions: write-all
on:
schedule:
# each day
- cron: "0 20 * * *"
workflow_dispatch:
jobs:
get_ref:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
with:
persist-credentials: false
ref: main
- name: Check Version
run: |
./tools/scripts/updateLatestCniPluginVersion.sh || exit 1
if git diff --exit-code &>/dev/null ; then
echo "updated=false" >> $GITHUB_ENV
else
echo "updated=true" >> $GITHUB_ENV
fi
- uses: crazy-max/ghaction-import-gpg@v6
if: ${{ env.updated == 'true' }}
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Create Pull Request
id: create_pr
if: ${{ env.updated == 'true' }}
uses: peter-evans/[email protected]
with:
title: "robot updated CNI plugins version "
commit-message: "robot updated CNI plugins version "
branch-suffix: timestamp
branch: robot/update_cni_version
committer: ty-dc <[email protected]>
delete-branch: true
base: main
signoff: true
token: ${{ secrets.GITHUB_TOKEN }}
labels: pr/release/robot_update_version