Skip to content

Commit

Permalink
Just rely on force-push instead of fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jun 23, 2023
1 parent d96f443 commit 8a3ac9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/finishReleaseCycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,10 @@ jobs:

- name: Update production branch
run: |
# Get the production branch locally
git fetch production
git switch production
# Delete the production branch and re-create it from staging
git switch staging
git branch -D production
# Re-create the production branch from staging
git switch -c production
# Force-update push the new production branch.
# Force-update the remote production branch.
git push --force origin production
- if: ${{ failure() }}
Expand Down Expand Up @@ -112,13 +106,7 @@ jobs:

- name: Update staging branch to trigger staging deploy
run: |
# Get the staging branch locally
git fetch staging
git switch staging
# Delete the staging branch and re-create it from main
git switch main
git branch -D staging
# Re-create the staging branch from main
git switch -c staging
# Force-update the updated staging branch
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,7 @@ jobs:
- name: Update staging branch from main
if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }}
run: |
# Get the staging branch locally
git fetch staging
git switch staging
# Delete the staging branch and re-create it from main
git switch main
git branch -D staging
# Re-create the staging branch from main
git switch -c staging
# Force-update the remote staging branch
Expand Down

0 comments on commit 8a3ac9b

Please sign in to comment.