Skip to content

Commit

Permalink
Merge pull request #2451 from alphagov/deploy-commit-gha
Browse files Browse the repository at this point in the history
Enable CI in GitHub Actions
  • Loading branch information
theseanything authored Aug 9, 2022
2 parents 1555805 + 5ea947f commit 9eea57a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
test:
name: Test
uses: alphagov/govuk-infrastructure/.github/workflows/test-rails.yaml@main
with:
requiresJavaScript: true
14 changes: 6 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ on:
- staging
- production
default: 'integration'
push:
branches:
- main
paths-ignore:
- "Jenkinsfile"
- ".git**"
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]

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
with:
gitRef: ${{ github.event.inputs.gitRef }}
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 }}
Expand All @@ -39,7 +38,6 @@ jobs:
uses: alphagov/govuk-infrastructure/.github/workflows/deploy.yaml@main
with:
imageTag: ${{ needs.build-and-publish-image.outputs.imageTag }}
workflowTrigger: ${{ github.event_name }}
environment: ${{ github.event.inputs.environment }}
secrets:
WEBHOOK_TOKEN: ${{ secrets.GOVUK_INTEGRATION_ARGO_EVENTS_WEBHOOK_TOKEN }}
Expand Down

0 comments on commit 9eea57a

Please sign in to comment.