Skip to content

Build and push latest docker image #157

Build and push latest docker image

Build and push latest docker image #157

name: Build and push latest docker image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push-latest-docker-image:
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code and submodule
uses: actions/checkout@v2
with:
submodules: recursive
- uses: nelonoel/branch-name@v1.0.1
- name: fetch tags
run: |
git fetch --unshallow
- name: Install SSH key
uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.CICD_RSA_KEY }}
- name: Build docker image
run: |
make docker-image
- name: Push to ECR
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-east-2
local-image: axelar/tofnd
image: tofnd:${{ github.sha }}