Skip to content

v0.1.19

v0.1.19 #5

Workflow file for this run

name: Prod Deploy
on:
release:
types: [published, deleted]
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
deploy_release:
runs-on: ubuntu-latest
steps:
- id: latest
uses: thebritican/fetch-latest-release@a36ee8ee464da77ba3e499ed6b75e3530e10f9bc # v2.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
ref: ${{ steps.latest.outputs.tag_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
workspaces: .
shared-key: "shared"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::417712557820:role/PublishECRImages
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: source-data-proxy
IMAGE_TAG: ${{ steps.latest.outputs.tag_name }}
run: |
docker buildx build --platform linux/arm64 -t $REGISTRY/$REPOSITORY:$IMAGE_TAG --push .
- name: Render Amazon ECS task definition
id: render-data-proxy-container
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition-family: source-data-proxy
container-name: source-data-proxy
image: 417712557820.dkr.ecr.us-west-2.amazonaws.com/source-data-proxy:${{ steps.latest.outputs.tag_name }}
- name: Deploy to Amazon ECS service
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.render-data-proxy-container.outputs.task-definition }}
service: source-data-proxy
cluster: SourceCooperative-Prod