Update index.md #9
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
# Template initialization workflow | |
# Adapted from https://github.com/garronej/ts_ci/blob/main/.github/workflows/template_initialization.yaml | |
name: template_initialization | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
template_initialization: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.created && github.repository != 'TNFSH-Programming-Contest/tps-starter' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
mv README.template.md README.md | |
- name: Replace tokens in README.md | |
uses: cschleiden/replace-tokens@v1 | |
with: | |
files: '["README.md"]' | |
env: | |
REPO_NAME: ${{ github.event.repository.name }} | |
DESC: ${{ github.event.repository.description }} | |
- name: Remove this workflow, it only needs to be run once. | |
run: rm .github/workflows/template_initialization.yaml | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -am "Replace the template's placeholders | |
Co-Authored-By: ${{ github.event.sender.login }} <${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com>" | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} | |
branch: main | |
debug: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository == 'TNFSH-Programming-Contest/tps-starter' }} | |
steps: | |
- name: Show envs | |
run: env | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Dump job context | |
env: | |
JOB_CONTEXT: ${{ toJSON(job) }} | |
run: echo "$JOB_CONTEXT" | |
- name: Dump steps context | |
env: | |
STEPS_CONTEXT: ${{ toJSON(steps) }} | |
run: echo "$STEPS_CONTEXT" | |
- name: Dump runner context | |
env: | |
RUNNER_CONTEXT: ${{ toJSON(runner) }} | |
run: echo "$RUNNER_CONTEXT" | |
- name: Dump strategy context | |
env: | |
STRATEGY_CONTEXT: ${{ toJSON(strategy) }} | |
run: echo "$STRATEGY_CONTEXT" | |
- name: Dump matrix context | |
env: | |
MATRIX_CONTEXT: ${{ toJSON(matrix) }} | |
run: echo "$MATRIX_CONTEXT" |