From f96431ec2719ae593476b44d0e2d188133d5d52f Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:34:48 -0600 Subject: [PATCH] chore: fix deploy PR.. we must merge deploy PRs with 'rebase and merge' --- .github/workflows/deploy.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 02994cc0..172db5bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,20 +27,17 @@ jobs: - name: Get latest tag id: get_latest_tag run: echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT - # - name: Checkout latest tag - # run: git checkout ${{ steps.get_latest_tag.outputs.tag }} - # - name: Ensure staging-release branch points to latest tag - # run: | - # git checkout -B staging-release ${{ steps.get_latest_tag.outputs.tag }} - # git push origin staging-release --force + - name: Ensure staging-release branch points to latest tag + run: | + git reset --hard ${{ steps.get_latest_tag.outputs.tag }} - name: Create Pull Request uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 with: token: ${{ secrets.SGTPOOKI_PAT }} base: staging - branch: ${{ steps.get_latest_tag.outputs.tag }} + branch: staging-release title: 'chore: point staging to release ${{ steps.get_latest_tag.outputs.tag }}' - body: 'This PR points the staging branch to release ${{ steps.get_latest_tag.outputs.tag }}.' + body: 'This PR points the staging branch to release ${{ steps.get_latest_tag.outputs.tag }}. **Choose "Rebase and merge" for this PR only!**' # from https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#keep-a-branch-up-to-date-with-another deploy-production: @@ -60,7 +57,6 @@ jobs: - name: Set production branch to latest tag deployed to staging run: | git reset --hard ${{ steps.get_latest_tag.outputs.tag }} - git merge -X theirs ${{ steps.get_latest_tag.outputs.tag }} - name: Create Pull Request uses: peter-evans/create-pull-request@v7.0.5 with: @@ -68,5 +64,5 @@ jobs: base: production branch: production-release title: 'chore: Point production to ${{ steps.get_latest_tag.outputs.tag }}' - body: 'This PR points the production branch to release ${{ steps.get_latest_tag.outputs.tag }}, which is the latest tag deployed to staging.' + 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!**'