-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
44 additions
and
79 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,8 +45,8 @@ jobs: | |
- name: Make the branch fresh | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
echo branch doesnt exist | ||
git checkout -b preview-spell-error || echo branch exists | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,11 @@ jobs: | |
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github actions bot | ||
run: | | ||
git config --system --add safe.directory "$GITHUB_WORKSPACE" | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
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' | ||
- name: Don't re-test if this is a sync branch | ||
run: | | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,11 +43,11 @@ jobs: | |
${{ inputs.directory }}/Dockerfile | ||
${{ inputs.directory }}/github_package_list.tsv | ||
- name: Login as jhudsl-robot | ||
- name: Login as github actions bot | ||
run: | | ||
git config --system --add safe.directory "$GITHUB_WORKSPACE" | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
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' | ||
# Set up Docker build | ||
- name: Set up Docker Buildx | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,8 @@ jobs: | |
- name: Make the branch fresh | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
branch_name='preview-${{ github.event.pull_request.number }}' | ||
echo branch doesnt exist | ||
|
@@ -130,8 +130,8 @@ jobs: | |
- name: Set up git checkout | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
branch_name='preview-${{ github.event.pull_request.number }}' | ||
git fetch --all | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,11 +49,11 @@ jobs: | |
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github actions bot | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
# We want a fresh run of the renders each time | ||
- name: Delete old docs/* | ||
|
@@ -101,11 +101,11 @@ jobs: | |
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github-actions bot | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
# Rendered content for Leanpub and Coursera is very similar. | ||
# This job creates a shared scaffold for both. | ||
|
@@ -140,11 +140,11 @@ jobs: | |
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github actions bot | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
# Create screenshots | ||
- name: Run the screenshot creation | ||
|
@@ -217,11 +217,11 @@ jobs: | |
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github action | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
# Run Coursera version | ||
- name: Convert Leanpub quizzes to Coursera | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,11 @@ jobs: | |
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github actions bot | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Get the version | ||
id: get_tag | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,25 +4,23 @@ | |
name: Starting a new course | ||
|
||
on: | ||
push: | ||
branches: [ main, staging ] | ||
workflow_dispatch: | ||
create: | ||
|
||
jobs: | ||
# Run cleaning process only if workflow is triggered by not being in the Bookdown template anymore | ||
template-cleanup: | ||
name: Template Cleanup | ||
first-time-setup: | ||
# ensure run only once, when repo generated | ||
if: github.run_number == 1 | ||
|
||
runs-on: ubuntu-latest | ||
if: github.event.repository.name != 'OTTR_Template' | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github actions bot | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
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 | ||
|
||
|
@@ -54,39 +52,10 @@ jobs: | |
docs/*.md \ | ||
manuscript/* | ||
# Commit modified files | ||
- name: Commit deleted files | ||
id: commit_it | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git add . | ||
git commit -m "Template cleanup" | ||
pushed_it=true | ||
git push || pushed_it=false | ||
echo "pushed_it=$pushed_it" >> $GITHUB_OUTPUT | ||
# If main is already protected, then file a PR | ||
- name: Create PR with deleted files | ||
if: steps.commit_it.outputs.pushed_it == 'false' | ||
uses: peter-evans/create-pull-request@v3 | ||
id: pr | ||
- name: Commit changed files | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit-message: Delete unnecessary files | ||
signoff: false | ||
branch: auto_copy_rendered_files | ||
delete-branch: true | ||
title: 'Automatic course set up' | ||
body: | | ||
### Description: | ||
This PR was initiated by the github actions. It helps set up this repository to be ready to write your course. | ||
It deletes some remnant files you don't need for your course but were used when this was a template. | ||
labels: | | ||
automated | ||
reviewers: $GITHUB_ACTOR | ||
token: ${{secrets.GH_PAT}} | ||
commit_message: "Setup repo" | ||
|
||
##### Filing issues! | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,11 @@ jobs: | |
- name: Checkout Repository | ||
uses: actions/checkout@master | ||
|
||
- name: Login as jhudsl-robot | ||
- name: Login as github actions bot | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Set up test-sync.yml | ||
run: | | ||
|