Setup and Init repository after create from template. #2
Workflow file for this run
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
name: Setup and Init repository after create from template. | |
# only to be run once. You may delete this file after the repo is created from template | |
on: | |
create: | |
jobs: | |
setup_repository: | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/github-script@v6 | |
with: | |
script: | | |
console.log("Setting up the repository", context); | |
const org = context.payload.repository.owner.login; | |
const repoName = context.payload.repository.name; | |
const setupScript = require('.github/workflows/setupRepository.cjs'); | |
setupScript.initRepo({github, context, org, repoName}); | |
- uses: stefanzweifel/git-auto-commit-action@v4 |