forked from afitzek/hasura-metric-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.21 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy Docker
permissions:
id-token: write
contents: read
# 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.sha }}
290051822633.dkr.ecr.eu-west-2.amazonaws.com/hasura-metric-adapter:latest