Skip to content

.github/workflows/update-course-materials.yml #3

.github/workflows/update-course-materials.yml

.github/workflows/update-course-materials.yml #3

on:
pull_request_target:
branches: main
- 'main'
paths:
- 'workshop_materials/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Zip Course materials
run: |
rm playbooks/roles/transfer_workshop_materials/files/workshop_materials.zip
zip -r playbooks/roles/transfer_workshop_materials/files/workshop_materials.zip workshop_materials
- uses: actions/upload-artifact@v3
with:
name: workshop_materials
path: playbooks/roles/transfer_workshop_materials/files/workshop_materials.zip
- name: Commit files
run: |
git config --local user.email "github@uu.nl"
git config --local user.name "GitHub Utrecht University"
git add .
git commit -a -m "Update course materials"
continue-on-error: true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.head_ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true