Skip to content

Commit

Permalink
Merge pull request #74 from alphagov/sengi/fix-workflows
Browse files Browse the repository at this point in the history
Fix GitHub workflow defs + bring in line with other repos.
  • Loading branch information
sengi authored Jan 25, 2024
2 parents f8be31c + 2561934 commit 8c26782
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 8c26782

Please sign in to comment.