From 00a3e66208d9d758cdf7ce067d5ddd2fff1ad730 Mon Sep 17 00:00:00 2001 From: Mads Kjeldgaard Date: Mon, 22 Jul 2024 11:46:47 +0200 Subject: [PATCH] ci: Add post-init action --- .github/workflows/init.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/init.yml diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml new file mode 100644 index 0000000..1a5256f --- /dev/null +++ b/.github/workflows/init.yml @@ -0,0 +1,28 @@ +ame: Init project from template + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: create + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + if: github.ref == 'refs/heads/master' + + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # After the temmplate has been created, the job will run the following steps + + + steps: + - name: Checkout code + - uses: actions/checkout@v3 + + # Search and replace the original URL with the new github URL in the Readme.md file + # The original url is https://github.com/madskjeldgaard/platformio-arduino-template + # Find and replace it with the new URL of your repository + - name: Search and replace URL + run: | + sed -i 's|https://github.com/madskjeldgaard/platformio-arduino-template|${{ github.event.repository.html_url }}|g' README.md