From 1a13fe066fa3881bf913312e7277d08dda7d500d Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Wed, 13 Jul 2022 16:34:16 -0700 Subject: [PATCH 1/2] Fetch tags before updating StagingDeployCash --- .github/workflows/preDeploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 5a008ec8c22f..381d4ee2ab80 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -114,7 +114,9 @@ jobs: # NOTE: This tag is only used locally and shouldn't be pushed to the remote. # If it was pushed, that would trigger the staging deploy which is handled in a separate workflow (deploy.yml) - name: Tag staging - run: git tag ${{ needs.createNewVersion.outputs.NEW_VERSION }} + run: | + git fetch --tags + git tag ${{ needs.createNewVersion.outputs.NEW_VERSION }} - name: Update StagingDeployCash uses: Expensify/App/.github/actions/javascript/createOrUpdateStagingDeploy@main From 98e22c321783b9c5289e8da76300cc0c746cd7cc Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Wed, 13 Jul 2022 16:36:56 -0700 Subject: [PATCH 2/2] just use fetch-depth: 0 --- .github/workflows/preDeploy.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 381d4ee2ab80..cadaac38d265 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -108,15 +108,14 @@ jobs: - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b 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. # If it was pushed, that would trigger the staging deploy which is handled in a separate workflow (deploy.yml) - name: Tag staging - run: | - git fetch --tags - git tag ${{ needs.createNewVersion.outputs.NEW_VERSION }} + run: git tag ${{ needs.createNewVersion.outputs.NEW_VERSION }} - name: Update StagingDeployCash uses: Expensify/App/.github/actions/javascript/createOrUpdateStagingDeploy@main