Skip to content

Commit

Permalink
Activate release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
  • Loading branch information
Jacob Woffenden committed Mar 12, 2024
1 parent e228285 commit a7f8e6d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 55 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: Release

on:
push:
tags:
- "*"

permissions: {}

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Install cosign
id: install_cosign
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0

- name: Configure AWS Credentials
id: configure_aws_credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::730335344807:role/modernisation-platform-oidc-cicd

- name: Login to Amazon ECR
id: login_ecr
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076
with:
registries: 374269020027

- name: Build and Push
id: build_and_push
uses: docker/build-push-action@af5a7ed5ba88268d5278f7203fb52cd833f66d6e # v5.2.0
with:
push: true
tags: 374269020027.dkr.ecr.eu-west-2.amazonaws.com/analytical-platform-scan-ecr-repo:${{ github.ref_name }}

- name: Sign
id: sign
shell: bash
run: |
cosign sign --yes 374269020027.dkr.ecr.eu-west-2.amazonaws.com/analytical-platform-scan-ecr-repo@${{ steps.build_and_push.outputs.digest }}
- name: Verify
id: verify
run: |
cosign verify \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
--certificate-identity=https://github.com/ministryofjustice/analytical-platform-jml-report/.github/workflows/release.yml@refs/tags/${{ github.ref_name }} \
374269020027.dkr.ecr.eu-west-2.amazonaws.com/analytical-platform-scan-ecr-repo@${{ steps.build_and_push.outputs.digest }}
55 changes: 0 additions & 55 deletions .github/workflows/release.yml.deactivated

This file was deleted.

0 comments on commit a7f8e6d

Please sign in to comment.