Skip to content

Commit

Permalink
Merge pull request #6684 from alphagov/modify_workflows
Browse files Browse the repository at this point in the history
fix deploy workflow & add automatic deploy workflow
  • Loading branch information
sengi committed Jul 22, 2022
2 parents 9d25642 + a5f8895 commit 00293f5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
37 changes: 37 additions & 0 deletions .github/workflows/set-automatic-deploys-enabled.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 00293f5

Please sign in to comment.