Merge pull request #300 from govuk-one-login/dependabot/bundler/rexml… #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AWS build and deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4 | |
- name: Install Ruby | |
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # pin@v1 | |
with: | |
bundler-cache: true | |
- name: Install Gems | |
run: bundle install | |
- name: Build | |
run: bundle exec middleman build | |
- name: Upload to ECR and tag | |
uses: govuk-one-login/devplatform-upload-action-ecr@5431bcea6158b6c12776a96e067b1e02bf91b13d # [email protected] | |
with: | |
role-to-assume-arn: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
container-sign-kms-key-arn: ${{ secrets.CONTAINER_SIGN_KMS_KEY }} | |
ecr-repo-name: ${{ secrets.ECR_REPOSITORY }} | |
artifact-bucket-name: ${{ secrets.ARTIFACT_BUCKET }} | |
dockerfile: "./DockerfileAWS" | |
checkout-repo: false |