Skip to content

Commit

Permalink
Merge pull request #2584 from alphagov/bulk/update-workflow-references
Browse files Browse the repository at this point in the history
  • Loading branch information
theseanything authored Oct 28, 2022
2 parents edc1563 + ddc297e commit 68826df
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 43 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Deploy

run-name: Deploy ${{ inputs.gitRef }} to ${{ inputs.environment }}

on:
workflow_dispatch:
inputs:
Expand All @@ -26,12 +28,12 @@ jobs:
build-and-publish-image:
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
name: Build and publish image
uses: alphagov/govuk-infrastructure/.github/workflows/ci-ecr.yaml@main
uses: alphagov/govuk-infrastructure/.github/workflows/build-and-push-image.yaml@main
with:
gitRef: ${{ github.event.inputs.gitRef || github.ref }}
secrets:
AWS_GOVUK_ECR_ACCESS_KEY_ID: ${{ secrets.AWS_GOVUK_ECR_ACCESS_KEY_ID }}
AWS_GOVUK_ECR_SECRET_ACCESS_KEY: ${{ secrets.AWS_GOVUK_ECR_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_GOVUK_ECR_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_GOVUK_ECR_SECRET_ACCESS_KEY }}
trigger-deploy:
name: Trigger deploy to ${{ github.event.inputs.environment }}
needs: build-and-publish-image
Expand All @@ -40,6 +42,6 @@ jobs:
imageTag: ${{ needs.build-and-publish-image.outputs.imageTag }}
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 }}
WEBHOOK_TOKEN: ${{ secrets.GOVUK_ARGO_EVENTS_WEBHOOK_TOKEN }}
WEBHOOK_URL: ${{ secrets.GOVUK_ARGO_EVENTS_WEBHOOK_URL }}
GH_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}
37 changes: 0 additions & 37 deletions .github/workflows/set-automatic-deploys-enabled.yaml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/set-automatic-deploys.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Set automatic deploys

run-name: Set automatic deploys to ${{ inputs.setAutomaticDeploys }} in ${{ inputs.environment }}

on:
workflow_dispatch:
inputs:
setAutomaticDeploys:
description: 'Set automatic deploys'
required: false
type: choice
options:
- enabled
- disabled
default: 'enabled'
environment:
description: 'Environment'
required: true
type: choice
options:
- integration
- staging
- production
default: 'integration'

jobs:
set-automatic-deploys:
name: Set automatic deploys
uses: alphagov/govuk-infrastructure/.github/workflows/set-automatic-deploys.yaml@main
with:
automaticDeploysEnabled: ${{ github.event.inputs.automaticDeploys == 'enabled' }}
environment: ${{ github.event.inputs.environment }}
secrets:
WEBHOOK_TOKEN: ${{ secrets.GOVUK_ARGO_EVENTS_WEBHOOK_TOKEN }}
WEBHOOK_URL: ${{ secrets.GOVUK_ARGO_EVENTS_WEBHOOK_URL }}
GH_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}

0 comments on commit 68826df

Please sign in to comment.