auth #3
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: Deploy Docker | |
# Run workflow on tags starting with v (eg. v2, v1.2.0) | |
on: | |
push: | |
# tags: | |
# - v* | |
branches: | |
- websocket | |
# todo tag and push to ecr | |
jobs: | |
Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v1 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::290051822633:role/ci/hasura-metric-adapter/github_hasura_metric_adapter | |
aws-region: eu-west-2 | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v2 | |
with: | |
push: true # Will only build if this is not here | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
290051822633.dkr.ecr.eu-west-2.amazonaws.com/hasura-metric-adapter:${{ github.ref_name }} | |
290051822633.dkr.ecr.eu-west-2.amazonaws.com/hasura-metric-adapter:latest |