Update CniPlugin Version #173
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: weizhoublue<[email protected]> | |
delete-branch: true | |
base: main | |
signoff: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
labels: pr/release/robot_update_version |