Skip to content

Commit

Permalink
Merge pull request #1253 from alphagov/tag-deployment
Browse files Browse the repository at this point in the history
Version releases and images
  • Loading branch information
theseanything authored Aug 8, 2023
2 parents eac6806 + 57c0605 commit a49e6db
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ on:
- staging
- production
default: 'integration'
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
release:
types: [released]

jobs:
build-and-publish-image:
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.tag_name, 'v')
name: Build and publish image
uses: alphagov/govuk-infrastructure/.github/workflows/build-and-push-image.yml@main
# TODO: switch this to track main branch
uses: alphagov/govuk-infrastructure/.github/workflows/build-and-push-image.yml@add-version-tag
with:
gitRef: ${{ inputs.gitRef || github.ref }}
secrets:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Release

on:
workflow_dispatch:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]

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

0 comments on commit a49e6db

Please sign in to comment.