Skip to content

Commit a5239af

Browse files
author
Sreeparna Deb
committed
chore(ci): test manual update available-plugins md
1 parent 8a042ed commit a5239af

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
11
name: Update Available-Plugins Table
22

33
on:
4-
schedule:
5-
- cron: '53 12 * * *' # at minute 50 of hour 12 UTC, every day (the first run will be today at 12:50)
64
workflow_dispatch:
75

86
jobs:
97
regen-table:
108
runs-on: ubuntu-latest
119
steps:
10+
# 1. Checkout the branch that triggered this run, with full history so we can commit back
1211
- name: Checkout repository
1312
uses: actions/checkout@v3
1413
with:
1514
fetch-depth: 0
15+
persist-credentials: true # so pushes use the built-in GITHUB_TOKEN
1616

17+
# 2. Prepare Python
1718
- name: Set up Python
1819
uses: actions/setup-python@v4
1920
with:
2021
python-version: '3.x'
2122

22-
- name: Install dependencies
23+
# 3. Install our one dependency
24+
- name: Install requests
2325
run: pip install requests
2426

27+
# 4. Regenerate the table
2528
- name: Generate plugins table
2629
env:
2730
CORE_PREFIX: ${{ secrets.CORE_PREFIX }}
28-
run: |
29-
python scripts/gen_dev_wiki_table.py > Available-Plugins.md
31+
run: python scripts/gen_dev_wiki_table.py > Available-Plugins.md
3032

33+
# 5. Commit & push the updated file back to the same branch
3134
- name: Commit & push changes
3235
uses: stefanzweifel/git-auto-commit-action@v4
3336
with:
3437
commit_message: "chore: auto-update Available-Plugins.md"
3538
file_pattern: Available-Plugins.md
36-
branch: test-auto-update-available-plugins
39+
branch: ${{ github.ref_name }} # push back to the branch that triggered the run

0 commit comments

Comments
 (0)