Skip to content

Commit

Permalink
Don't run Next.js deploy if first job already updated vars
Browse files Browse the repository at this point in the history
  • Loading branch information
ebronson68 committed Dec 15, 2023
1 parent 4f565c4 commit f692826
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ephemeral-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ jobs:
echo "environmentVariables=${ENVIRONMENT_VARIABLES}" >> $GITHUB_OUTPUT
echo "buildArguments=${BUILDARGS}" >> $GITHUB_OUTPUT
echo "alreadyDeployed=true" >> $GITHUB_OUTPUT
- name: Remove keys from environment variables
id: remove-prime-keys
Expand Down Expand Up @@ -230,10 +231,11 @@ jobs:
hostname: ${{ steps.hostname.outputs.hostname }}
next-app: ${{ steps.check-next.outputs.next-app }}
targetPort: ${{ steps.target-port.outputs.targetPort }}
alreadyDeployed: ${{ steps.next-vars.outputs.alreadyDeployed }}

update-next-deploy:
name: Update Next.js Container App
if: ${{ needs.deploy.outputs.next-app == 'true' }}
if: ${{ needs.deploy.outputs.next-app == 'true' && needs.deploy.outputs.alreadyDeployed != 'true' }}
needs: [prepare,deploy]
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit f692826

Please sign in to comment.