From 83eb5bc55ba5d984cffb8bb9fe83bf23cf447fd9 Mon Sep 17 00:00:00 2001 From: Josh Stillman Date: Thu, 7 Sep 2023 16:38:00 -0400 Subject: [PATCH] pass environment to reusable action --- .github/workflows/build-deploy.yml | 5 +++++ .github/workflows/dev.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 2bc3846..bc918c6 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -1,10 +1,15 @@ on: workflow_call: + inputs: + environment: + required: true + type: string jobs: # Build job build-and-deploy: runs-on: ubuntu-latest + environment: ${{ inputs.environment }} env: NEXT_PUBLIC_API_URL: ${{ secrets.API_URL }} steps: diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f296a91..8df11d9 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -16,4 +16,6 @@ jobs: build-deploy-dev: uses: ./.github/workflows/build-deploy.yml secrets: inherit + with: + environment: dev