diff --git a/.github/workflows/cd-deploy-to-prod.yml b/.github/workflows/cd-deploy-to-prod.yml index 3b76c3d3..9e201269 100644 --- a/.github/workflows/cd-deploy-to-prod.yml +++ b/.github/workflows/cd-deploy-to-prod.yml @@ -16,6 +16,7 @@ jobs: build: uses: ./.github/workflows/sub-build-push-image.yml with: + environment: production dockerfile_path: ./Dockerfile dockerfile_target: runner app_name: ${{ vars.APP_NAME }} diff --git a/.github/workflows/cd-deploy-to-test.yml b/.github/workflows/cd-deploy-to-test.yml index 0498c8fe..3f109b40 100644 --- a/.github/workflows/cd-deploy-to-test.yml +++ b/.github/workflows/cd-deploy-to-test.yml @@ -24,6 +24,7 @@ jobs: build: uses: ./.github/workflows/sub-build-push-image.yml with: + environment: staging dockerfile_path: ./Dockerfile dockerfile_target: runner app_name: ${{ vars.APP_NAME }} diff --git a/.github/workflows/sub-build-push-image.yml b/.github/workflows/sub-build-push-image.yml index c9b00270..63f504ef 100644 --- a/.github/workflows/sub-build-push-image.yml +++ b/.github/workflows/sub-build-push-image.yml @@ -15,6 +15,10 @@ on: registry: required: true type: string + environment: + required: true + type: string + description: The environment to deploy to outputs: image_digest: description: The image digest to be used on a caller workflow @@ -30,6 +34,8 @@ jobs: permissions: contents: read id-token: write + environment: + name: ${{ inputs.environment }} steps: - uses: actions/checkout@v4.1.0 with: