-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.48 KB
/
handle-result.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
53
54
55
56
57
name: Process result-* Branch
on:
push:
branches:
- "result-*"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: List files
run: ls -R
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: ${{ github.ref_name}}
path: |
*.log
*.rc
if-no-files-found: error
- name: Switch to master
run: |
git fetch origin +refs/heads/master:refs/remotes/origin/master
git checkout master
git checkout ${{ github.ref_name }} -- '*.rc'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '^3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade -r requirements.txt
- name: Update badges
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
python update.py ${{ github.ref_name }} *.rc
git rm -f *.rc
git add status.json badges
if ! git diff --cached --quiet
then git commit -m 'Update for ${{ github.ref_name }}'
git push
else echo '[INFO] No changes to commit'
fi
git branch -D ${{ github.ref_name }}
git push origin :refs/heads/${{ github.ref_name }}