Skip to content

Commit

Permalink
fix: stop using secrets in if declarations
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Nov 10, 2024
1 parent e7f8b7f commit a19578b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:

jobs:
build:
env:
DEPLOY_TO_TEST: ${{ github.ref == 'refs/heads/main' && secrets.RENDER_TEST_DEPLOY_URL != 'disabled' }}
DEPLOY_TO_MAIN: ${{ github.ref == 'refs/heads/main' && secrets.RENDER_MAIN_DEPLOY_URL != 'disabled' }}
runs-on: depot-ubuntu-22.04

steps:
Expand Down Expand Up @@ -44,13 +47,13 @@ jobs:
platforms: linux/amd64,linux/arm64

- name: Deploy to Test Render
if: ${{ github.ref == 'refs/heads/main' && secrets.RENDER_TEST_DEPLOY_URL != 'disabled' }}
if: ${{ env.DEPLOY_TO_TEST == 'true' }}
uses: joelwmale/[email protected]
with:
url: ${{ secrets.RENDER_TEST_DEPLOY_URL }}

- name: Deploy to Main Render
if: ${{ github.ref == 'refs/heads/main' && secrets.RENDER_MAIN_DEPLOY_URL != 'disabled' }}
if: ${{ env.DEPLOY_TO_MAIN == 'true' }}
uses: joelwmale/[email protected]
with:
url: ${{ secrets.RENDER_MAIN_DEPLOY_URL }}

0 comments on commit a19578b

Please sign in to comment.