Skip to content

Commit f96431e

Browse files
committed
chore: fix deploy PR.. we must merge deploy PRs with 'rebase and merge'
1 parent 0f87fcd commit f96431e

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,17 @@ jobs:
2727
- name: Get latest tag
2828
id: get_latest_tag
2929
run: echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
30-
# - name: Checkout latest tag
31-
# run: git checkout ${{ steps.get_latest_tag.outputs.tag }}
32-
# - name: Ensure staging-release branch points to latest tag
33-
# run: |
34-
# git checkout -B staging-release ${{ steps.get_latest_tag.outputs.tag }}
35-
# git push origin staging-release --force
30+
- name: Ensure staging-release branch points to latest tag
31+
run: |
32+
git reset --hard ${{ steps.get_latest_tag.outputs.tag }}
3633
- name: Create Pull Request
3734
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
3835
with:
3936
token: ${{ secrets.SGTPOOKI_PAT }}
4037
base: staging
41-
branch: ${{ steps.get_latest_tag.outputs.tag }}
38+
branch: staging-release
4239
title: 'chore: point staging to release ${{ steps.get_latest_tag.outputs.tag }}'
43-
body: 'This PR points the staging branch to release ${{ steps.get_latest_tag.outputs.tag }}.'
40+
body: 'This PR points the staging branch to release ${{ steps.get_latest_tag.outputs.tag }}. **Choose "Rebase and merge" for this PR only!**'
4441

4542
# from https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#keep-a-branch-up-to-date-with-another
4643
deploy-production:
@@ -60,13 +57,12 @@ jobs:
6057
- name: Set production branch to latest tag deployed to staging
6158
run: |
6259
git reset --hard ${{ steps.get_latest_tag.outputs.tag }}
63-
git merge -X theirs ${{ steps.get_latest_tag.outputs.tag }}
6460
- name: Create Pull Request
6561
uses: peter-evans/[email protected]
6662
with:
6763
token: ${{ secrets.SGTPOOKI_PAT }}
6864
base: production
6965
branch: production-release
7066
title: 'chore: Point production to ${{ steps.get_latest_tag.outputs.tag }}'
71-
body: 'This PR points the production branch to release ${{ steps.get_latest_tag.outputs.tag }}, which is the latest tag deployed to staging.'
67+
body: 'This PR points the production branch to release ${{ steps.get_latest_tag.outputs.tag }}, which is the latest tag deployed to staging. **Choose "Rebase and merge" for this PR only!**'
7268

0 commit comments

Comments
 (0)