Skip to content

Starting a new course #583

Starting a new course

Starting a new course #583

Workflow file for this run

# Code adapted from https://github.com/JetBrains/intellij-platform-plugin-template/blob/deb171483598ee8a5d7621154db880e87b4db4ef/.github/workflows/template-cleanup.yml
# by Candace Savonen for this repository.
name: Starting a new course
on:
create:
jobs:
first-time-setup:
# ensure run only once, when repo generated
if: github.run_number == 1
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: Login as github actions bot
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
##### Delete Template-specific files that aren't needed for new courses
# Cleanup Template-specific bits
- name: Cleanup
run: |
# Cleanup
mv .github/course_README_template.md README.md
rm -rf \
.github/workflows/report-maker.yml \
.github/workflows/send-updates.yml \
.github/workflows/test-send-updates.yml \
.github/sync.yml \
.github/test-sync.yml \
.github/workflows/starting-course.yml \
.github/ISSUE_TEMPLATE/course-template-problem-report.md \
.github/ISSUE_TEMPLATE/course-template-feature-request.md \
resources/code_output \
resources/screenshots \
resources/course_screenshots \
resources/gs_slides \
resources/image_to_slide_key.tsv \
resources/images/02-chapter_of_course_files \
resources/images/03-test_cases_files \
resources/images/04-figures_files \
resources/chapt_screen_images \
Course_Name.rds \
docs/*.html \
docs/*.md \
manuscript/*
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Setup repo"
##### Filing issues!
# Issue for what repository settings need to be set
- name: New Course - Set Repository Settings
uses: peter-evans/create-issue-from-file@v4
with:
title: New Course - Set Repository Settings
content-filepath: .github/automatic-issues/set-repo-settings.md
labels: automated training issue
# Issue for what needs to be edited
- name: New Course - Templates to Edit
uses: peter-evans/create-issue-from-file@v4
with:
title: New Course - Templates to Edit
content-filepath: .github/automatic-issues/templates-to-edit.md
labels: automated training issue
# Issue for how to enroll repo for updates
- name: New Course - Template Update Enrollment
uses: peter-evans/create-issue-from-file@v4
with:
title: New Course - Template Update Enrollment
content-filepath: .github/automatic-issues/update-enrollment.md
labels: automated training issue
# Issue for adding a method of feedback
- name: Reminder - Add a method of user feedback
uses: peter-evans/create-issue-from-file@v4
with:
title: Reminder - Add user feedback method
content-filepath: .github/automatic-issues/add-feedback-method.md
labels: automated training issue
- name: Get organization name
id: get_org_name
run: |
org_name=$(dirname ${{github.repository}})
echo "org_name=$org_name" >> $GITHUB_OUTPUT
echo $org_name
# Issue for adding the course to the jhudsl library
- name: Reminder - Add to jhudsl library
if: ${{ steps.get_org_name.outputs.org_name == 'jhudsl' }}
uses: peter-evans/create-issue-from-file@v4
with:
title: Reminder - Add to jhudsl library
content-filepath: .github/automatic-issues/add-to-library.md
labels: automated training issue