create.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Create
  2. # The workflow will run only when `use this template` is used
  3. on:
  4. create:
  5. jobs:
  6. create:
  7. # We will only run this action when the repository isn't the template repository
  8. # Reference https://docs.github.com/en/actions/learn-github-actions/contexts
  9. # Reference https://docs.github.com/en/actions/learn-github-actions/expressions
  10. if: ${{ !github.event.repository.is_template }}
  11. runs-on: ubuntu-latest
  12. permissions: write-all
  13. steps:
  14. - name: "Check out the repo"
  15. uses: "actions/checkout@v3"
  16. - name: "Update package.json"
  17. run: ./.github/scripts/rename.sh "$GITHUB_REPOSITORY" "$GITHUB_REPOSITORY_OWNER"
  18. - name: "Add rename summary"
  19. run: |
  20. echo "## Commit results" >> $GITHUB_STEP_SUMMARY
  21. echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
  22. - name: "Update commit"
  23. uses: stefanzweifel/git-auto-commit-action@v4
  24. with:
  25. commit_message: "feat: initial commit"
  26. commit_options: "--amend"
  27. push_options: "--force"
  28. skip_fetch: true
  29. - name: "Add commit summary"
  30. run: |
  31. echo "## Commit results" >> $GITHUB_STEP_SUMMARY
  32. echo "✅ Passed" >> $GITHUB_STEP_SUMMARY