Skip to content

Commit ad46ca4

Browse files
fix deploy workflow & add automatic deploy workflow
1 parent 360229d commit ad46ca4

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

.github/workflows/deploy.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
uses: alphagov/govuk-infrastructure/.github/workflows/deploy.yaml@main
4040
with:
4141
imageTag: ${{ needs.build-and-publish-image.outputs.imageTag }}
42-
manualDeploy: ${{ 'main' != github.event.inputs.gitRef }}
43-
environment: ${{ github.event.inputs.environment || 'integration' }}
42+
workflowTrigger: ${{ github.event_name }}
43+
environment: ${{ github.event.inputs.environment }}
4444
secrets:
45-
WEBHOOK_TOKEN: ${{ secrets.ARGO_EVENTS_WEBHOOK_TOKEN }}
46-
WEBHOOK_URL: ${{ secrets.ARGO_EVENTS_WEBHOOK_URL }}
45+
WEBHOOK_TOKEN: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_TOKEN }}
46+
WEBHOOK_URL: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_URL }}
4747
GOVUK_CI_GITHUB_API_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Set automatic_deploys_enabled (optionally image_tag too)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
resetImageTag:
7+
description: 'Reset image tag to main'
8+
required: false
9+
default: false
10+
type: boolean
11+
automaticDeploysEnabled:
12+
description: 'Activate automatic deploys'
13+
required: false
14+
default: true
15+
type: boolean
16+
environment:
17+
description: 'Environment to deploy to'
18+
required: true
19+
type: choice
20+
options:
21+
- integration
22+
- staging
23+
- production
24+
default: 'integration'
25+
26+
jobs:
27+
set_automatic_deploys_enabled:
28+
name: Set automatic_deploys_enabled to ${{ github.event.inputs.environment }}
29+
uses: alphagov/govuk-infrastructure/.github/workflows/set-automatic-deploys-enabled.yaml@main
30+
with:
31+
resetImageTag: ${{ github.event.inputs.resetImageTag == 'true' }}
32+
automaticDeploysEnabled: ${{ github.event.inputs.automaticDeploysEnabled == 'true' }}
33+
environment: ${{ github.event.inputs.environment }}
34+
secrets:
35+
WEBHOOK_TOKEN: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_TOKEN }}
36+
WEBHOOK_URL: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_URL }}
37+
GOVUK_CI_GITHUB_API_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}

0 commit comments

Comments
 (0)