Skip to content

fixing the import used for development (#30) #47

fixing the import used for development (#30)

fixing the import used for development (#30) #47

# Template initialization workflow
# Adapted from https://github.com/garronej/ts_ci/blob/main/.github/workflows/template_initialization.yaml
name: template_initialization
on:
push:
branches:
- master
jobs:
template_initialization:
runs-on: ubuntu-latest
if: ${{ github.event.created && github.repository != 'wikimedia-gadgets/twinkle-starter' }}
permissions: write-all
steps:
- uses: actions/checkout@v3
- run: |
mv README.template.md README.md
- name: Replace tokens in README.MD and package.json
uses: cschleiden/replace-tokens@v1
with:
files: '["README.md","package.json","package-lock.json","Gruntfile.js"]'
env:
REPO_NAME: ${{ github.event.repository.name }}
USER_OR_ORG: ${{ github.repository_owner }}
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 "[email protected]"
git config --local user.name "twinkle_bot"
git commit -am "Replacing the template's placeholders"
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
branch: master
debug:
runs-on: ubuntu-latest
if: ${{ github.repository == 'wikimedia-gadgets/twinkle-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"