-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (51 loc) · 1.64 KB
/
update-actions.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 Actions version
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
dump-contexts-to-log:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vdaas/vald/.github/actions/dump-context@main
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.CI_TOKEN }}
- name: Set Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Run update command
run: |
make update/actions
- name: Check difference
id: check_diff
run: |
if git diff --quiet --exit-code; then
echo "Nothing updated"
else
git diff && git status
echo "HAS_GIT_DIFF=true" >> $GITHUB_OUTPUT
fi
- name: Create PR
if: ${{ steps.check_diff.outputs.HAS_GIT_DIFF == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
author: "${{ secrets.CI_USER }} <vald@vdaas.org>"
token: ${{ secrets.CI_TOKEN }}
committer: "${{ secrets.CI_USER }} <vald@vdaas.org>"
commit-message: "automated changes"
signoff: true
delete-branch: true
base: main
branch: chore/update-actions
title: "chore(deps): bump GitHub Actions dependency updates"
body: "Automated pull request to update GitHub Actions dependencies."