-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.09 KB
/
update.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
name: Update syllabi
on:
push:
branches-ignore:
- "main" # Don't run with the main branch, because we want version-branches
- "draft/**" # Don't publish draft branches
jobs:
update_syllabi:
runs-on: ubuntu-latest
steps:
- name: Get syllabus name
# Get the name of this syllabus from the repository (owner/repo_name) by
# stripping off the owner/ prefix and the _syllabus suffix
run: |
echo "NAME=$(basename ${{ github.repository }} _syllabus)" >> $GITHUB_ENV
- name: Call syllabi/update.yml
uses: octokit/[email protected]
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: qhinf
repo: syllabi
workflow_id: update.yml
ref: main
inputs: |
name: ${{ format('{0}/{1}', env.NAME, github.ref_name) }}
ref: ${{ github.sha }}
url: ${{ github.repositoryUrl }}
branch: ${{ github.ref_name }}
add: true
env:
GITHUB_TOKEN: ${{ secrets.PAT_SYLLABI_UPDATE }}