|
| 1 | +name: Step 1, TBD-step-1-name |
| 2 | + |
| 3 | +# This step triggers after TBD-step-1-event-desc |
| 4 | +# This step sets STEP to 2 |
| 5 | +# This step closes <details id=1> and opens <details id=2> |
| 6 | + |
| 7 | +# This will run every time we TBD-step-1-event-desc |
| 8 | +# Reference https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows |
| 9 | +on: |
| 10 | + workflow_dispatch: |
| 11 | + TBD-step-1-event: |
| 12 | + |
| 13 | +permissions: |
| 14 | + # Need `contents: read` to checkout the repository |
| 15 | + # Need `contents: write` to update the step metadata |
| 16 | + contents: write |
| 17 | + |
| 18 | +jobs: |
| 19 | + on_TBD-step-1-event: |
| 20 | + name: On TBD-step-1-event |
| 21 | + |
| 22 | + # We will only run this action when: |
| 23 | + # 1. This repository isn't the template repository |
| 24 | + # 2. The STEP is currently 1 (see update-step.sh) |
| 25 | + # Reference https://docs.github.com/en/actions/learn-github-actions/contexts |
| 26 | + # Reference https://docs.github.com/en/actions/learn-github-actions/expressions |
| 27 | + if: ${{ github.repository_owner != 'TBD-organization' }} |
| 28 | + |
| 29 | + # We'll run Ubuntu for performance instead of Mac or Windows |
| 30 | + runs-on: ubuntu-latest |
| 31 | + |
| 32 | + steps: |
| 33 | + # We'll need to check out the repository so that we can edit the README |
| 34 | + - name: Checkout |
| 35 | + uses: actions/checkout@v2 |
| 36 | + with: |
| 37 | + fetch-depth: 0 # Let's get all the branches |
| 38 | + |
| 39 | + # TBD-step-1-additional-steps |
| 40 | + |
| 41 | + # Update README to close <details id=1> |
| 42 | + # and open <details id=2> |
| 43 | + # and set STEP to '2' |
| 44 | + - name: Update to step 2 |
| 45 | + run: ./.github/script/update-step.sh |
| 46 | + env: |
| 47 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + FROM_STEP: 1 |
| 49 | + TO_STEP: 2 |
| 50 | + BRANCH_NAME: TBD-branch-name |
0 commit comments