diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a11e3b0d7..9ca85fbb1 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -39,9 +39,9 @@ jobs: uses: alphagov/govuk-infrastructure/.github/workflows/deploy.yaml@main with: imageTag: ${{ needs.build-and-publish-image.outputs.imageTag }} - manualDeploy: ${{ 'main' != github.event.inputs.gitRef }} - environment: ${{ github.event.inputs.environment || 'integration' }} + workflowTrigger: ${{ github.event_name }} + environment: ${{ github.event.inputs.environment }} secrets: - WEBHOOK_TOKEN: ${{ secrets.ARGO_EVENTS_WEBHOOK_TOKEN }} - WEBHOOK_URL: ${{ secrets.ARGO_EVENTS_WEBHOOK_URL }} + WEBHOOK_TOKEN: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_TOKEN }} + WEBHOOK_URL: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_URL }} GOVUK_CI_GITHUB_API_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }} diff --git a/.github/workflows/set-automatic-deploys-enabled.yaml b/.github/workflows/set-automatic-deploys-enabled.yaml new file mode 100644 index 000000000..217b0ecba --- /dev/null +++ b/.github/workflows/set-automatic-deploys-enabled.yaml @@ -0,0 +1,37 @@ +name: Set automatic_deploys_enabled (optionally image_tag too) + +on: + workflow_dispatch: + inputs: + resetImageTag: + description: 'Reset image tag to main' + required: false + default: false + type: boolean + automaticDeploysEnabled: + description: 'Activate automatic deploys' + required: false + default: true + type: boolean + environment: + description: 'Environment to deploy to' + required: true + type: choice + options: + - integration + - staging + - production + default: 'integration' + +jobs: + set_automatic_deploys_enabled: + name: Set automatic_deploys_enabled to ${{ github.event.inputs.environment }} + uses: alphagov/govuk-infrastructure/.github/workflows/set-automatic-deploys-enabled.yaml@main + with: + resetImageTag: ${{ github.event.inputs.resetImageTag == 'true' }} + automaticDeploysEnabled: ${{ github.event.inputs.automaticDeploysEnabled == 'true' }} + environment: ${{ github.event.inputs.environment }} + secrets: + WEBHOOK_TOKEN: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_TOKEN }} + WEBHOOK_URL: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_URL }} + GOVUK_CI_GITHUB_API_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}