Skip to content

Commit

Permalink
[TASK] Automatically update site package (#51)
Browse files Browse the repository at this point in the history
Releases: main
  • Loading branch information
linawolf authored Dec 18, 2024
1 parent 9a3fffa commit e433a53
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/auto-pr-sitepackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit e433a53

Please sign in to comment.