From b0e98282b323865881ee0b897d50f6f40f0035f2 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:32:46 -0700 Subject: [PATCH] Remove updateProtectedBranch from preDeploy --- .github/workflows/preDeploy.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 0e77dbe4704f..8814c593afbf 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -88,14 +88,23 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Update staging branch from main - if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} - uses: Expensify/App/.github/actions/composite/updateProtectedBranch@main + - uses: actions/checkout@v3 + with: + ref: main + token: ${{ secrets.OS_BOTIFY_TOKEN }} + + - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main with: - TARGET_BRANCH: staging - OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} + - name: Update staging branch from main + run: | + git switch staging + git switch main + git branch -D staging + git switch -c staging + git push --force origin staging + - name: Cherry-pick PR to staging if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} uses: Expensify/App/.github/actions/javascript/triggerWorkflowAndWait@main @@ -104,12 +113,6 @@ jobs: WORKFLOW: cherryPick.yml INPUTS: '{ "PULL_REQUEST_NUMBER": "${{ needs.chooseDeployActions.outputs.MERGED_PR }}", "NEW_VERSION": "${{ needs.createNewVersion.outputs.NEW_VERSION }}" }' - # Version: 3.0.2 - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - ref: staging - fetch-depth: 0 - # Create a local git tag on staging so that GitUtils.getPullRequestsMergedBetween can use `git log` to generate a # list of pull requests that were merged between this version tag and another. # NOTE: This tag is only used locally and shouldn't be pushed to the remote.