Skip to content

Commit

Permalink
Merge pull request #4 from alphagov/deployment
Browse files Browse the repository at this point in the history
Setup for deployment
  • Loading branch information
mike29736 authored Dec 6, 2023
2 parents 93e57f6 + 7d72e28 commit 727d7dc
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.dockerignore
.git
.github
.rspec
.rubocop.yml
Dockerfile
LICENCE.txt
README.md
spec
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy

run-name: Deploy ${{ inputs.gitRef || github.ref_name }} to integration

on:
workflow_dispatch:
inputs:
gitRef:
description: 'Commit, tag or branch name to deploy'
required: true
type: string
release:
types: [released]

jobs:
build-and-publish-image:
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref_name, 'v')
name: Build and publish image
uses: alphagov/govuk-infrastructure/.github/workflows/build-and-push-image.yml@main
with:
gitRef: ${{ inputs.gitRef || github.ref_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 integration
needs: build-and-publish-image
uses: alphagov/govuk-infrastructure/.github/workflows/deploy.yml@main
with:
imageTag: ${{ needs.build-and-publish-image.outputs.imageTag }}
environment: integration
secrets:
WEBHOOK_TOKEN: ${{ secrets.GOVUK_ARGO_EVENTS_WEBHOOK_TOKEN }}
WEBHOOK_URL: ${{ secrets.GOVUK_ARGO_EVENTS_WEBHOOK_URL }}
GH_TOKEN: ${{ secrets.GOVUK_CI_GITHUB_API_TOKEN }}
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG ruby_version=3.2
FROM ghcr.io/alphagov/govuk-ruby-builder:$ruby_version

COPY Gemfile* .ruby-version ./
RUN bundle install
COPY . .
USER app

CMD ["./collect"]

0 comments on commit 727d7dc

Please sign in to comment.