worksheet 07 #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Config on New Issue | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
update-config: | |
if: contains(github.event.issue.labels.*.name, 'lecture') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install GitHub CLI | |
run: sudo apt-get install -y gh | |
- name: Authenticate with GitHub CLI | |
run: echo "${{ secrets.GH_PAT }}" | gh auth login --with-token | |
- name: Parse issue content and update config | |
env: | |
ISSUE_BODY: ${{ github.event.issue.body }} | |
GITHUB_ISSUE_NUMBER: ${{ github.event.issue.number }} | |
run: python update-lecture.py |