Skip to content

Commit

Permalink
Merge pull request #8081 from Expensify/Rory-FixPreDeployBadCP
Browse files Browse the repository at this point in the history
[No QA] Parse JSON of DO_CHERRY_PICK
  • Loading branch information
francoisl authored Mar 11, 2022
2 parents dbbcf5d + 6fab621 commit 4a66aa8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
run: echo "DO_CHERRY_PICK=${{ fromJSON(needs.chooseDeployActions.outputs.isStagingDeployLocked) && fromJSON(needs.chooseDeployActions.outputs.shouldCherryPick) }}" >> "$GITHUB_ENV"

- name: Cherry pick to staging
if: ${{ env.DO_CHERRY_PICK }}
if: ${{ fromJSON(env.DO_CHERRY_PICK) }}
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
Expand All @@ -161,7 +161,7 @@ jobs:
NPM_VERSION: ${{ env.NEW_VERSION }}

- name: Comment in StagingDeployCash to alert Applause that a new pull request has been cherry-picked
if: ${{ env.DO_CHERRY_PICK }}
if: ${{ fromJSON(env.DO_CHERRY_PICK) }}
run: |
PR_URL="https://github.com/Expensify/App/pull/${{ needs.chooseDeployActions.outputs.mergedPullRequest }}"
printf -v COMMENT ":clap: Heads up @Expensify/applauseleads :clap:\nA [new pull request](%s) has been :cherries: cherry-picked :cherries: to staging, and will be deployed to staging in version \`%s\` :rocket:" "$PR_URL" ${{ env.NEW_VERSION }}
Expand All @@ -172,14 +172,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Wait for staging deploys to finish
if: ${{ env.DO_CHERRY_PICK }}
if: ${{ fromJSON(env.DO_CHERRY_PICK) }}
uses: Expensify/App/.github/actions/awaitStagingDeploys@main
with:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
TAG: ${{ env.NEW_VERSION }}

- name: Comment in StagingDeployCash to alert Applause that cherry-picked pull request has been deployed.
if: ${{ env.DO_CHERRY_PICK }}
if: ${{ fromJSON(env.DO_CHERRY_PICK) }}
run: |
gh issue comment \
"$(gh issue list --label StagingDeployCash --json number --jq '.[0].number')" \
Expand Down

0 comments on commit 4a66aa8

Please sign in to comment.