From db9082e87033cabb4b33c9bf802e78cfde185007 Mon Sep 17 00:00:00 2001 From: Jonathan Ferrari Date: Tue, 18 Jun 2024 13:31:17 -0700 Subject: [PATCH] Update update-lecture.yml --- .github/workflows/update-lecture.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update-lecture.yml b/.github/workflows/update-lecture.yml index c90f22e..78e8925 100644 --- a/.github/workflows/update-lecture.yml +++ b/.github/workflows/update-lecture.yml @@ -13,22 +13,16 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Node.js environment - uses: actions/setup-node@v4 + - name: Set up Python environment + uses: actions/setup-python@v4 with: - node-version: '20' + python-version: '3.8' - name: Parse issue content id: parse_issue - run: | - ISSUE_BODY="${{ github.event.issue.body }}" - echo "Issue body: $ISSUE_BODY" - LECTURE_NUMBER=$(echo "$ISSUE_BODY" | grep -oP 'Lecture Number: \K.*' | tr -d '\r' | xargs) - DEMO=$(echo "$ISSUE_BODY" | grep -oP 'Demo: \K.*' | tr -d '\r' | xargs) - SLIDES=$(echo "$ISSUE_BODY" | grep -oP 'Slides: \K.*' | tr -d '\r' | xargs) - echo "Lecture_Number=$LECTURE_NUMBER" >> $GITHUB_ENV - echo "Demo=$DEMO" >> $GITHUB_ENV - echo "Slides=$SLIDES" >> $GITHUB_ENV + env: + ISSUE_BODY: ${{ github.event.issue.body }} + run: python parse_issue.py - name: Update _config.yml run: | @@ -54,8 +48,8 @@ jobs: - name: Commit changes run: | - git config --global user.name 'jonathanferrari' - git config --global user.email 'jonathanferrari@berkeley.edu' + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' git add _config.yml git commit -m "Update _config.yml for lecture ${LEC_NUM}" git push