-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (45 loc) · 1.51 KB
/
update_deps.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
on:
workflow_dispatch:
schedule:
- cron: "0 05 * * SUN"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.7"
- name: Update SC4S Version
run: |
./sc4s_sync.sh
- name: Update Splunk Builds
run: |
./splunk_sync.sh
- uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.SA_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.SA_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Create PR with new versions
run: |
git config --global user.email ${{ secrets.GH_USER_EMAIL }}
git config --global user.name ${{ secrets.GH_USER_ADMIN }}
git config --global commit.gpgsign true
BRANCH_NAME="fix/update-versions"
( git checkout "$BRANCH_NAME" && git checkout main && git branch -D "$BRANCH_NAME" ) || true
git checkout -B "$BRANCH_NAME"
git add . || exit 1
git commit -am "fix: update sc4s/splunk versions" || true
git push -f --set-upstream origin "$BRANCH_NAME" || true
sleep 10s
gh pr create \
--title "fix: bump sc4s/splunk versions" --fill --head "$BRANCH_NAME" || true
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}