From eb5213f8cd579d97e4589e91670f9eb9607afd0a Mon Sep 17 00:00:00 2001 From: Sebastian Quintero Date: Thu, 12 Sep 2024 13:04:23 -0500 Subject: [PATCH] Enable staging and prod deployments automatically --- .github/workflows/release.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 069c8ee..b25782a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,9 +26,24 @@ permissions: packages: read jobs: + determine_environments: + runs-on: ubuntu-latest + outputs: + environments: ${{ steps.set-environments.outputs.environments }} + steps: + - name: Set environments + id: set-environments + run: | + if [ "${{ inputs.TARGET_ENVIRONMENT }}" != "" ]; then + echo "environments=${{ inputs.TARGET_ENVIRONMENT }}" >> $GITHUB_OUTPUT + exit 0 + echo "environments=staging,prod" >> $GITHUB_OUTPUT update_apps: runs-on: ubuntu-latest - environment: ${{ inputs.TARGET_ENVIRONMENT || 'staging' }} # TODO: Change to prod once nicely tested. + needs: determine_environments + strategy: + matrix: + environment: ${{fromJson(needs.determine_environments.outputs.environments)}} env: BUCKET: ${{ secrets.S3_BUCKET }} FOLDER: ${{ secrets.S3_FOLDER }}