From 3c49c798e1511ce2b62d499649036820b71626e5 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Fri, 3 Mar 2023 22:34:55 +0500 Subject: [PATCH 1/2] ci: auto remove rename.sh and create.yml on repo creation --- .github/workflows/create.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml index 66417a9..67ead5b 100644 --- a/.github/workflows/create.yml +++ b/.github/workflows/create.yml @@ -27,6 +27,16 @@ jobs: echo "## Commit results" >> $GITHUB_STEP_SUMMARY echo "✅ Passed" >> $GITHUB_STEP_SUMMARY + - name: "Remove `rename.sh` and `create.yml`" + run: | + rm -rf "./.github/scripts/rename.sh" + rm -rf "./.github/workflows/create.yml" + + - name: "Add remove summary" + run: | + echo "## Remove results" >> $GITHUB_STEP_SUMMARY + echo "✅ Passed" >> $GITHUB_STEP_SUMMARY + - name: "Update commit" uses: "stefanzweifel/git-auto-commit-action@v4" with: From 5194147931e5ad8a178cb904a83ae83c5a33e5f2 Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Sat, 4 Mar 2023 12:31:24 +0200 Subject: [PATCH 2/2] ci: remove "-f" flag ci: improve writing in comments --- .github/workflows/create.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml index 67ead5b..f6dc27b 100644 --- a/.github/workflows/create.yml +++ b/.github/workflows/create.yml @@ -1,14 +1,14 @@ name: "Create" -# The workflow will run only when `use this template` is used +# The workflow will run only when the "Use this template" button is used on: create: jobs: create: - # We will only run this action when the repository isn't the template repository - # Reference https://docs.github.com/en/actions/learn-github-actions/contexts - # Reference https://docs.github.com/en/actions/learn-github-actions/expressions + # We only run this action when the repository isn't the template repository. References: + # - https://docs.github.com/en/actions/learn-github-actions/contexts + # - https://docs.github.com/en/actions/learn-github-actions/expressions if: ${{ !github.event.repository.is_template }} permissions: "write-all" runs-on: "ubuntu-latest" @@ -24,17 +24,17 @@ jobs: - name: "Add rename summary" run: | - echo "## Commit results" >> $GITHUB_STEP_SUMMARY + echo "## Commit result" >> $GITHUB_STEP_SUMMARY echo "✅ Passed" >> $GITHUB_STEP_SUMMARY - name: "Remove `rename.sh` and `create.yml`" run: | - rm -rf "./.github/scripts/rename.sh" - rm -rf "./.github/workflows/create.yml" + rm -f "./.github/scripts/rename.sh" + rm -f "./.github/workflows/create.yml" - name: "Add remove summary" run: | - echo "## Remove results" >> $GITHUB_STEP_SUMMARY + echo "## Remove result" >> $GITHUB_STEP_SUMMARY echo "✅ Passed" >> $GITHUB_STEP_SUMMARY - name: "Update commit" @@ -47,5 +47,5 @@ jobs: - name: "Add commit summary" run: | - echo "## Commit results" >> $GITHUB_STEP_SUMMARY + echo "## Commit result" >> $GITHUB_STEP_SUMMARY echo "✅ Passed" >> $GITHUB_STEP_SUMMARY