Skip to content

Commit

Permalink
Fix GitHub workflow defs + bring in line with other repos.
Browse files Browse the repository at this point in the history
Just copied them over from another repo. (I picked frontend as the
pattern.)

The deploy workflow was failing with `failed to fetch workflow` because
it was referring to
`govuk-infrastructure/.github/workflows/build-and-push-image.yml@add-version-tag`
(which no longer exists).
  • Loading branch information
sengi committed Jan 25, 2024
1 parent f8be31c commit 2561934
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Deploy

run-name: Deploy ${{ inputs.gitRef || github.ref_name }} to ${{ inputs.environment || 'integration' }}
run-name: Deploy ${{ inputs.gitRef || github.event.release.tag_name }} to ${{ inputs.environment || 'integration' }}

on:
workflow_dispatch:
Expand All @@ -23,16 +23,16 @@ on:

jobs:
build-and-publish-image:
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref_name, 'v')
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'v')
name: Build and publish image
uses: alphagov/govuk-infrastructure/.github/workflows/build-and-push-image.yml@add-version-tag
uses: alphagov/govuk-infrastructure/.github/workflows/build-and-push-image.yml@main
with:
gitRef: ${{ inputs.gitRef || github.ref_name }}
gitRef: ${{ inputs.gitRef || github.event.release.tag_name }}
secrets:
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 }}
name: Trigger deploy to ${{ inputs.environment || 'integration' }}
needs: build-and-publish-image
uses: alphagov/govuk-infrastructure/.github/workflows/deploy.yml@main
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Release

permissions:
contents: write

on:
workflow_dispatch:
workflow_run:
Expand All @@ -14,9 +11,6 @@ jobs:
release:
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
name: Release
# TODO: switch this to track main branch
uses: alphagov/govuk-infrastructure/.github/workflows/release.yml@add-version-tag
uses: alphagov/govuk-infrastructure/.github/workflows/release.yml@main
secrets:
GH_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}


0 comments on commit 2561934

Please sign in to comment.