generated from skills/template-template
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
0 parents
commit 6dfa54c
Showing
11 changed files
with
963 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bash | ||
# Make sure this file is executable | ||
# chmod a+x .github/script/update-step.sh | ||
|
||
echo "Check that we are on FROM_STEP" | ||
if [ "$(cat .github/script/STEP)" != $FROM_STEP ] | ||
then | ||
echo "Current step is not $FROM_STEP" | ||
exit 0 | ||
fi | ||
|
||
echo "Make sure we are on the main branch" | ||
git checkout main | ||
|
||
echo "Remove 'open' from any <details> tags" | ||
sed -r 's/<details id=([0-9]+) open>/<details id=\1>/g' README.md > tmp | ||
mv tmp README.md | ||
|
||
echo "Add 'open' to step TO_STEP" | ||
sed -r "s/<details id=$TO_STEP>/<details id=$TO_STEP open>/g" README.md > tmp | ||
mv tmp README.md | ||
|
||
echo "Update the STEP file to TO_STEP" | ||
echo "$TO_STEP" > .github/script/STEP | ||
|
||
echo "Commit the files, and push to main" | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git add README.md | ||
git add .github/script/STEP | ||
git commit --message="Update to $TO_STEP in STEP and README.md" | ||
git push | ||
|
||
echo "If BRANCH_NAME, update that branch as well" | ||
if git show-ref --quiet refs/heads/$BRANCH_NAME | ||
then | ||
git checkout $BRANCH_NAME | ||
git cherry-pick main | ||
git push | ||
else | ||
echo "Branch $BRANCH_NAME does not exist" | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Step 0, Start | ||
|
||
# This step triggers after the learner creates a new repository from the template | ||
# This step sets STEP to 1 | ||
# This step closes <details id=0> and opens <details id=1> | ||
|
||
# This will run every time we create push a commit to `main` | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
# Need `contents: read` to checkout the repository | ||
# Need `contents: write` to update the step metadata | ||
contents: write | ||
|
||
jobs: | ||
on_start: | ||
name: On start | ||
|
||
# We will only run this action when: | ||
# 1. This repository isn't the template repository | ||
# 2. The STEP is currently '0' (see update-step.sh) | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions | ||
if: ${{ github.repository_owner != 'githublearn' }} | ||
|
||
# We'll run Ubuntu for performance instead of Mac or Windows | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# We'll need to check out the repository so that we can edit the README | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Let's get all the branches | ||
|
||
# TBD Include any additional set up steps here | ||
|
||
# Update README to close <details id=0> | ||
# and open <details id=1> | ||
# and set STEP to '1' | ||
- name: Update to step 1 | ||
run: ./.github/script/update-step.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
FROM_STEP: 0 | ||
TO_STEP: 1 | ||
BRANCH_NAME: my-first-branch |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Step 1, TBD | ||
|
||
# This step triggers after TBD | ||
# This step sets STEP to 2 | ||
# This step closes <details id=1> and opens <details id=2> | ||
|
||
# This will run every time we TBD | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
on: | ||
workflow_dispatch: | ||
TBD: | ||
|
||
permissions: | ||
# Need `contents: read` to checkout the repository | ||
# Need `contents: write` to update the step metadata | ||
contents: write | ||
|
||
jobs: | ||
on_TBD: | ||
name: On TBD | ||
|
||
# We will only run this action when: | ||
# 1. This repository isn't the template repository | ||
# 2. The STEP is currently 1 (see update-step.sh) | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions | ||
if: ${{ github.repository_owner != 'githublearn' }} | ||
|
||
# We'll run Ubuntu for performance instead of Mac or Windows | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# We'll need to check out the repository so that we can edit the README | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Let's get all the branches | ||
|
||
# TBD include any further steps here | ||
|
||
# Update README to close <details id=1> | ||
# and open <details id=2> | ||
# and set STEP to '2' | ||
- name: Update to step 2 | ||
run: ./.github/script/update-step.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
FROM_STEP: 1 | ||
TO_STEP: 2 | ||
BRANCH_NAME: TBD |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Step 2, TBD | ||
|
||
# This step triggers after TBD | ||
# This step sets STEP to 3 | ||
# This step closes <details id=2> and opens <details id=3> | ||
|
||
# This will run every time we TBD | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
on: | ||
workflow_dispatch: | ||
TBD: | ||
|
||
permissions: | ||
# Need `contents: read` to checkout the repository | ||
# Need `contents: write` to update the step metadata | ||
contents: write | ||
|
||
jobs: | ||
on_TBD: | ||
name: On TBD | ||
|
||
# We will only run this action when: | ||
# 1. This repository isn't the template repository | ||
# 2. The STEP is currently 2 (see update-step.sh) | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions | ||
if: ${{ github.repository_owner != 'githublearn' }} | ||
|
||
# We'll run Ubuntu for performance instead of Mac or Windows | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# We'll need to check out the repository so that we can edit the README | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Let's get all the branches | ||
|
||
# TBD include any further steps here | ||
|
||
# Update README to close <details id=2> | ||
# and open <details id=3> | ||
# and set STEP to '3' | ||
- name: Update to step 3 | ||
run: ./.github/script/update-step.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
FROM_STEP: 2 | ||
TO_STEP: 3 | ||
BRANCH_NAME: TBD |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Step 3, TBD | ||
|
||
# This step triggers after TBD | ||
# This step sets STEP to 4 | ||
# This step closes <details id=3> and opens <details id=4> | ||
|
||
# This will run every time we TBD | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
on: | ||
workflow_dispatch: | ||
TBD: | ||
|
||
permissions: | ||
# Need `contents: read` to checkout the repository | ||
# Need `contents: write` to update the step metadata | ||
contents: write | ||
|
||
jobs: | ||
on_TBD: | ||
name: On TBD | ||
|
||
# We will only run this action when: | ||
# 1. This repository isn't the template repository | ||
# 2. The STEP is currently 3 (see update-step.sh) | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions | ||
if: ${{ github.repository_owner != 'githublearn' }} | ||
|
||
# We'll run Ubuntu for performance instead of Mac or Windows | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# We'll need to check out the repository so that we can edit the README | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Let's get all the branches | ||
|
||
# TBD include any further steps here | ||
|
||
# Update README to close <details id=3> | ||
# and open <details id=4> | ||
# and set STEP to '4' | ||
- name: Update to step 4 | ||
run: ./.github/script/update-step.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
FROM_STEP: 3 | ||
TO_STEP: 4 | ||
BRANCH_NAME: TBD |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Step 4, TBD | ||
|
||
# This step triggers after TBD | ||
# This step sets STEP to 5 | ||
# This step closes <details id=4> and opens <details id=5> | ||
|
||
# This will run every time we TBD | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
on: | ||
workflow_dispatch: | ||
TBD: | ||
|
||
permissions: | ||
# Need `contents: read` to checkout the repository | ||
# Need `contents: write` to update the step metadata | ||
contents: write | ||
|
||
jobs: | ||
on_TBD: | ||
name: On TBD | ||
|
||
# We will only run this action when: | ||
# 1. This repository isn't the template repository | ||
# 2. The STEP is currently 4 (see update-step.sh) | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions | ||
if: ${{ github.repository_owner != 'githublearn' }} | ||
|
||
# We'll run Ubuntu for performance instead of Mac or Windows | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# We'll need to check out the repository so that we can edit the README | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Let's get all the branches | ||
|
||
# TBD include any further steps here | ||
|
||
# Update README to close <details id=4> | ||
# and open <details id=5> | ||
# and set STEP to '5' | ||
- name: Update to step 5 | ||
run: ./.github/script/update-step.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
FROM_STEP: 4 | ||
TO_STEP: 5 | ||
BRANCH_NAME: TBD |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Step 5, Merge your pull request | ||
|
||
# This step triggers after a pull requst is merged to `main` | ||
# This step sets STEP to X | ||
# This step closes <details id=5> and opens <details id=X> | ||
|
||
# This will run every time we create push a commit to `main` | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
# Need `contents: read` to checkout the repository | ||
# Need `contents: write` to update the step metadata | ||
contents: write | ||
|
||
jobs: | ||
on_merge: | ||
name: On merge | ||
|
||
# We will only run this action when: | ||
# 1. This repository isn't the template repository | ||
# 2. The STEP is currently 5 (see update-step.sh) | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/contexts | ||
# Reference https://docs.github.com/en/actions/learn-github-actions/expressions | ||
if: ${{ github.repository_owner != 'githublearn' }} | ||
|
||
# We'll run Ubuntu for performance instead of Mac or Windows | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# We'll need to check out the repository so that we can edit the README | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Let's get all the branches | ||
|
||
# Update README to close <details id=5> | ||
# and open <details id=X> | ||
# and set STEP to 'X' | ||
- name: Update to step X | ||
run: ./.github/script/update-step.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
FROM_STEP: 5 | ||
TO_STEP: X | ||
BRANCH_NAME: TBD |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Compiled source # | ||
################### | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.o | ||
*.so | ||
|
||
# Packages # | ||
############ | ||
# it's better to unpack these files and commit the raw source | ||
# git has its own built in compression methods | ||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
|
||
# Logs and databases # | ||
###################### | ||
*.log | ||
*.sql | ||
*.sqlite | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db |
Oops, something went wrong.