diff --git a/.github/workflows/plugin-build.yml b/.github/workflows/plugin-build.yml index 2e200a6..3c1a622 100644 --- a/.github/workflows/plugin-build.yml +++ b/.github/workflows/plugin-build.yml @@ -46,17 +46,10 @@ jobs: cat .deployignore | xargs rm -rf fi - - name: Create and push built branch - run: | - git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" - git config --global user.name "${{ github.actor }}" - git config --global credential.helper "store --file=.git/credentials" - echo "username=${{ github.actor }}" >> .git/credentials - echo "password=${{ secrets.GITHUB_TOKEN }}" >> .git/credentials - git fetch origin main-built - git checkout -b main-built - git merge --allow-unrelated-histories origin/main-built - git add -A # Stage all changes, including untracked files - git clean -fdX - git commit -m "Built WordPress plugin" --no-verify - git push origin main-built + - name: Push to built branch + uses: Automattic/action-commit-to-branch@master + with: + branch: 'main-built' + commit_message: 'Built main' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Required