Skip to content

Update clean-template.yml #2

Update clean-template.yml

Update clean-template.yml #2

name: first-time-setup
run-name: first time setup of repo
on:
# run when branch created (repo generated from template)
create:
# only keep latest run of this workflow
concurrency:
group: first-time-setup
cancel-in-progress: true
# ADDED THIS CHANGE
permissions:
actions: write
checks: write
contents: write
jobs:
first-time-setup:
# ensure run only once, when repo generated
if: github.run_number == 1
runs-on: ubuntu-latest
steps:
# get main branch repo contents

Check failure on line 28 in .github/workflows/clean-template.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/clean-template.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
- name: Checkout code
uses: actions/checkout@v3
# ADDED THIS CHANGE
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# remove files not needed for user instance of template
- name: Remove unneeded files
run: rm -f README.md demo.md testbed.md
# personalize readme for user
- name: Init readme
run: |
echo "
Personalized readme text. Hello ${{ github.repository_owner }}!
" > README.md
# save changed files
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Setup repo"
# ADDED THIS CHANGE
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}