Skip to content

Commit

Permalink
Update "update-step"
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr committed Mar 10, 2022
1 parent 98c8c04 commit d9f1947
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 61 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/0-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
branches:
- main

# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
# Need `contents: read` to checkout the repository
# Need `contents: write` to update the step metadata
Expand All @@ -28,7 +28,7 @@ jobs:
# 1. This repository isn't the template repository
# 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' }}
if: ${{ !github.event.repository.is_template }}

# We'll run Ubuntu for performance instead of Mac or Windows
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,14 +71,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Update README to close <details id=0>
# and open <details id=1>
# Update README to close <details id=0> and open <details id=1>
# and set STEP to '1'
- name: Update to step 1
uses: githublearn/action-update-step@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
FROM_STEP: 0
TO_STEP: 1
BRANCH_NAME: emoji-workflow
uses: githublearn/action-update-step@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
from_step: 0
to_step: 1
branch_name: emoji-workflow
19 changes: 9 additions & 10 deletions .github/workflows/1-create-a-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
branches:
- emoji-workflow

# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
# Need `contents: read` to checkout the repository
# Need `contents: write` to update the step metadata
Expand All @@ -25,7 +26,7 @@ jobs:
# 1. This repository isn't the template repository
# 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' }}
if: ${{ !github.event.repository.is_template }}

# We'll run Ubuntu for performance instead of Mac or Windows
runs-on: ubuntu-latest
Expand All @@ -44,14 +45,12 @@ jobs:
FILE: ".github/workflows/emoji.yml"
SEARCH: "name:"

# Update README to close <details id=1>
# and open <details id=2>
# Update README to close <details id=1> and open <details id=2>
# and set STEP to '2'
- name: Update to step 2
uses: githublearn/action-update-step@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
FROM_STEP: 1
TO_STEP: 2
BRANCH_NAME: emoji-workflow
uses: githublearn/action-update-step@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
from_step: 1
to_step: 2
branch_name: emoji-workflow
19 changes: 9 additions & 10 deletions .github/workflows/2-add-a-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
branches:
- emoji-workflow

# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
# Need `contents: read` to checkout the repository
# Need `contents: write` to update the step metadata
Expand All @@ -25,7 +26,7 @@ jobs:
# 1. This repository isn't the template repository
# 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' }}
if: ${{ !github.event.repository.is_template }}

# We'll run Ubuntu for performance instead of Mac or Windows
runs-on: ubuntu-latest
Expand All @@ -44,14 +45,12 @@ jobs:
FILE: ".github/workflows/emoji.yml"
SEARCH: "jobs:"

# Update README to close <details id=2>
# and open <details id=3>
# Update README to close <details id=2> and open <details id=3>
# and set STEP to '3'
- name: Update to step 3
uses: githublearn/action-update-step@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
FROM_STEP: 2
TO_STEP: 3
BRANCH_NAME: emoji-workflow
uses: githublearn/action-update-step@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
from_step: 2
to_step: 3
branch_name: emoji-workflow
19 changes: 9 additions & 10 deletions .github/workflows/3-add-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
branches:
- emoji-workflow

# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
# Need `contents: read` to checkout the repository
# Need `contents: write` to update the step metadata
Expand All @@ -25,7 +26,7 @@ jobs:
# 1. This repository isn't the template repository
# 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' }}
if: ${{ !github.event.repository.is_template }}

# We'll run Ubuntu for performance instead of Mac or Windows
runs-on: ubuntu-latest
Expand All @@ -44,14 +45,12 @@ jobs:
FILE: ".github/workflows/emoji.yml"
SEARCH: "actions/checkout"

# Update README to close <details id=3>
# and open <details id=4>
# Update README to close <details id=3> and open <details id=4>
# and set STEP to '4'
- name: Update to step 4
uses: githublearn/action-update-step@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
FROM_STEP: 3
TO_STEP: 4
BRANCH_NAME: emoji-workflow
uses: githublearn/action-update-step@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
from_step: 3
to_step: 4
branch_name: emoji-workflow
19 changes: 9 additions & 10 deletions .github/workflows/4-merge-your-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
branches:
- main

# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
# Need `contents: read` to checkout the repository
# Need `contents: write` to update the step metadata
Expand All @@ -25,7 +26,7 @@ jobs:
# 1. This repository isn't the template repository
# 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' }}
if: ${{ !github.event.repository.is_template }}

# We'll run Ubuntu for performance instead of Mac or Windows
runs-on: ubuntu-latest
Expand All @@ -37,14 +38,12 @@ jobs:
with:
fetch-depth: 0 # Let's get all the branches

# Update README to close <details id=4>
# and open <details id=5>
# Update README to close <details id=4> and open <details id=5>
# and set STEP to '5'
- name: Update to step 5
uses: githublearn/action-update-step@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
FROM_STEP: 4
TO_STEP: 5
BRANCH_NAME: emoji-workflow
uses: githublearn/action-update-step@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
from_step: 4
to_step: 5
branch_name: emoji-workflow
19 changes: 9 additions & 10 deletions .github/workflows/5-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
types:
- completed

# Reference https://docs.github.com/en/actions/security-guides/automatic-token-authentication
permissions:
# Need `contents: read` to checkout the repository
# Need `contents: write` to update the step metadata
Expand All @@ -27,7 +28,7 @@ jobs:
# 1. This repository isn't the template repository
# 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' }}
if: ${{ !github.event.repository.is_template }}

# We'll run Ubuntu for performance instead of Mac or Windows
runs-on: ubuntu-latest
Expand All @@ -39,14 +40,12 @@ jobs:
with:
fetch-depth: 0 # Let's get all the branches

# Update README to close <details id=5>
# and open <details id=X>
# Update README to close <details id=5> and open <details id=X>
# and set STEP to 'X'
- name: Update to step X
uses: githublearn/action-update-step@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
FROM_STEP: 5
TO_STEP: X
BRANCH_NAME: test-workflow
uses: githublearn/action-update-step@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
from_step: 5
to_step: X
branch_name: test-workflow

0 comments on commit d9f1947

Please sign in to comment.