Skip to content

Commit

Permalink
Merge pull request #270 from alphagov/sengi/update-workflows
Browse files Browse the repository at this point in the history
Update GitHub Actions workflow boilerplate.
  • Loading branch information
sengi committed May 14, 2024
2 parents efdd0a1 + c829d95 commit e2e0a46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ jobs:
# Redis running through govuk-infrastructure action
REDIS_URL: redis://localhost:6379
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
show-progress: false
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
Expand Down
7 changes: 3 additions & 4 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 @@ -9,7 +9,6 @@ on:
description: 'Commit, tag or branch name to deploy'
required: true
type: string
default: 'main'
environment:
description: 'Environment to deploy to'
required: true
Expand All @@ -24,11 +23,11 @@ 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-multiarch-image.yml@main
with:
gitRef: ${{ inputs.gitRef || github.ref_name }}
gitRef: ${{ inputs.gitRef || github.event.release.tag_name }}
permissions:
id-token: write
contents: read
Expand Down

0 comments on commit e2e0a46

Please sign in to comment.