diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index d769a41cf..c2bdeb662 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -7,10 +7,6 @@ on: # Nothing! Only `secrets: inherit` is required ### Typical / recommended - environment: - description: Environment name; omit for PRs - required: false - type: string etl: description: Run the cronjob and verify results? [true|false] required: false @@ -79,7 +75,7 @@ jobs: deploy: name: Deploy - environment: ${{ inputs.environment }} + environment: ${{ github.event_name == 'pull_request' && '' || inputs.target }} needs: [init] outputs: triggered: ${{ steps.trigger.outputs.triggered }} @@ -158,7 +154,7 @@ jobs: verify: name: Verify ETL # if: inputs.etl == 'true' #&& needs.deploy.outputs.triggered == 'true' - environment: ${{ inputs.environment }} + environment: ${{ github.event_name == 'pull_request' && '' || inputs.target }} needs: [deploy] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index d50210079..6a953f41e 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -1,7 +1,6 @@ name: Merge on: - pull_request: push: branches: [main] paths-ignore: @@ -27,7 +26,6 @@ jobs: secrets: inherit uses: ./.github/workflows/.deploy.yml with: - environment: test tag: ${{ inputs.tag }} # Uses PR number if blank target: test @@ -38,5 +36,5 @@ jobs: secrets: inherit uses: ./.github/workflows/.deploy.yml with: - environment: prod + tag: ${{ inputs.tag }} # Uses PR number if blank target: prod