-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (63 loc) · 1.89 KB
/
query.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
58
59
60
61
62
63
name: Scheduled Polling
on:
schedule:
- cron: "*/30 * * * *"
push:
paths:
- 'fetch/workflow_template.yaml'
workflow_dispatch:
inputs:
origin:
description: 'The entity that dispatches this event'
required: false
type: string
teams:
description: 'Comma-separated numeric team IDs to update. Default to empty, meaning updating all teams.'
required: false
type: string
concurrency:
group: polling
cancel-in-progress: true
jobs:
fetch-update:
name: Fetch updates
environment: Polling
runs-on: ubuntu-latest
steps:
- name: Log initiator
shell: bash
run: |
echo ::notice::This polling is started by ${{ inputs.origin }} on behalf of ${{ github.triggering_actor }}
- name: Checkout
uses: actions/checkout@v4
- name: Auth as Github App
id: auth-as-github-app
shell: bash
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
run: bash fetch/auth.sh
- name: Re-Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.auth-as-github-app.outputs.token }}
- name: Setup Python3
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Query Updates
shell: bash
env:
GITHUB_TOKEN: ${{ steps.auth-as-github-app.outputs.token }}
BILUOCHUN_TOKEN: ${{ secrets.BILUOCHUN_TOKEN }}
run: python3 fetch/query.py ${{ inputs.teams }}
- name: Commit Changes
shell: bash
run: |
source fetch/commit_info.sh
git add .github/workflows
git commit -m "`date -u`: create/update new build workflow(s)" || true
git add mods
git commit -m "`date -u`: trigger new build(s)" || true
git push