diff --git a/.github/workflows/update_testing.yml b/.github/workflows/update_testing.yml new file mode 100644 index 0000000..a558011 --- /dev/null +++ b/.github/workflows/update_testing.yml @@ -0,0 +1,26 @@ +name: Create testing promotion pull request +on: + # Allow to manually trigger the workflow + workflow_dispatch: + # Run it when when someone pushes to master + push: + branches: + - master +jobs: + testingPromotion: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: testing + - name: Reset promotion branch + run: | + git fetch origin master:master + git reset --hard master + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + branch: testing-promotion + title: 'Upgrade testing from master' + body: | + Upgrade testing from master diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 20198ca..281d059 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -48,7 +48,7 @@ fi #================================================= # Replace new version in _common.sh -sed -i "s/^commit_sha=.*/commit_sha=$commit_hash/" scripts/_common.sh +sed -i "s/^commit_sha=.*/commit_sha=\"$commit_hash\"/" scripts/_common.sh #================================================= # GENERIC FINALIZATION diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index 4ae84de..66764ab 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -39,24 +39,6 @@ jobs: id: cpr-testing if: ${{ env.PROCEED == 'true' }} uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update testing to version ${{ env.VERSION }} - committer: 'yunohost-bot ' - author: 'yunohost-bot ' - signoff: false - base: testing - branch: ci-auto-update-v${{ env.VERSION }}-testing - delete-branch: true - title: 'Upgrade to version ${{ env.VERSION }} into testing' - body: | - Upgrade to v${{ env.VERSION }} - [See upstream release page](https://github.com/${{ env.REPO }}/releases/tag/v${{ env.VERSION }}) - draft: false - - name: Create Pull Request to master - id: cpr-master - if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update master to version ${{ env.VERSION }}