From 011dded282bae21b975e83b7823ab6974cd97dc0 Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:40:46 -0600 Subject: [PATCH] chore: debugging staging and prod release prs --- .github/workflows/deploy.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 825799f2..d6aac6fe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,14 +28,10 @@ jobs: 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 }} - name: Create Pull Request uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 with: token: ${{ secrets.SGTPOOKI_PAT }} - base: staging 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 }}.' @@ -47,26 +43,15 @@ jobs: - uses: actions/checkout@v4 with: token: ${{ secrets.SGTPOOKI_PAT }} - fetch-depth: 0 # Fetch all history so that git commands work correctly - - name: Fetch all branches and tags - run: | - git fetch --all --tags - - name: Get latest tag merged into staging - id: get_latest_tag - run: | - git checkout origin/staging - latest_tag=$(git describe --tags $(git rev-list --tags --merged origin/staging --max-count=1)) - echo "tag=$latest_tag" >> $GITHUB_OUTPUT - - name: Checkout latest tag - run: git checkout ${{ steps.get_latest_tag.outputs.tag }} - - name: Ensure production branch points to latest tag + ref: production + - name: Ensure production branch points to latest staging run: | - git checkout -B production ${{ steps.get_latest_tag.outputs.tag }} + git fetch origin staging:staging + git reset --hard staging - name: Create Pull Request uses: peter-evans/create-pull-request@v7.0.5 with: token: ${{ secrets.SGTPOOKI_PAT }} - base: production branch: production-release title: 'chore: Point production to release ${{ steps.get_latest_tag.outputs.tag }}' body: 'This PR points the production branch to release ${{ steps.get_latest_tag.outputs.tag }}.'