-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (46 loc) · 1.42 KB
/
update_gamescope.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
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '40 0,12 * * *'
push:
branches: 'update-gamescope-script'
workflow_dispatch:
jobs:
check_updates:
runs-on: ubuntu-latest
steps:
- name: add build deps and set git
run: |
sudo apt-get install -y devscripts
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- if: github.event_name != 'push'
uses: actions/checkout@v3
with:
ref: main
submodules: recursive
- if: github.event_name == 'push'
uses: actions/checkout@v3
with:
submodules: recursive
- shell: bash
env:
GH_TOKEN: ${{ secrets.PR_BOT_TOKEN }}
run: |
git fetch --no-recurse-submodules
(
cd gamescope
git fetch --no-recurse-submodules
git fetch --no-recurse-submodules --tag
)
set +e
./scripts/gamescope_version.py
RESULT=$?
set -e
if [[ $RESULT -eq 42 ]]; then
echo '::warning ::Update found, PR raised.'
elif [[ $RESULT -eq 43 ]]; then
echo '::warning ::Update found, update branch already exists, you probably have a PR to merge..'
else
exit $RESULT
fi