diff --git a/.github/workflows/auto-pr-sitepackage.yml b/.github/workflows/auto-pr-sitepackage.yml index c0e3463..6c5b2ab 100644 --- a/.github/workflows/auto-pr-sitepackage.yml +++ b/.github/workflows/auto-pr-sitepackage.yml @@ -16,6 +16,7 @@ jobs: PR_TITLE: 'Automated Update of Site Package Files' PR_BODY: 'This PR contains automatic updates to the site package files generated by the script.' BASE_BRANCH: 'main' # The branch you want to merge the PR into + NEW_BRANCH: 'auto/sitepackage-update-$(date +%s)' steps: - name: Checkout Repository @@ -45,20 +46,18 @@ jobs: - name: Create a New Branch for Changes run: | - NEW_BRANCH="auto/sitepackage-update-$(date +%s)" - git checkout -b $NEW_BRANCH + git checkout -b ${{ env.NEW_BRANCH }} git add . git commit -m "${{ env.COMMIT_MESSAGE }}" - - name: Push Changes to New Branch - run: | - git push --force --set-upstream origin $NEW_BRANCH + # Push to remote and set the upstream + git push --set-upstream origin ${{ env.NEW_BRANCH }} - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - branch: $NEW_BRANCH # Source branch (newly created branch) + branch: ${{ env.NEW_BRANCH }} # Source branch (newly created branch) base: ${{ env.BASE_BRANCH }} # Target branch (main or production branch) title: ${{ env.PR_TITLE }} body: ${{ env.PR_BODY }}