A0-2999: Run all workflows on node20 #84
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: Build and push ink-dev container to ECR | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '*.md' | |
- 'LICENSE' | |
pull_request: | |
jobs: | |
build-test-docker: | |
name: Build docker image and test on contract | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: GIT | Checkout Source code | |
uses: actions/checkout@v4 | |
- name: DOCKER | Build image and run test | |
run: make build-ink-dev-x86_64 && make test-contract-x86_64 | |
build-push-docker: | |
name: Build and push | |
runs-on: ubuntu-20.04 | |
if: > | |
github.ref == 'refs/heads/main' && github.event_name != 'pull_request' || | |
github.event_name == 'workflow_dispatch' | |
steps: | |
- name: GIT | Checkout Source code | |
uses: actions/checkout@v4 | |
- name: AWS | Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: AWS | Login to ECR | |
uses: docker/login-action@v1 | |
with: | |
registry: public.ecr.aws | |
username: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} | |
password: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} | |
- name: DOCKER | Export IMAGE_TAG | |
run: | | |
echo "IMAGE_TAG=`cat Makefile | grep "DOCKER_TAG :=" | awk '{print $3}'`" >> $GITHUB_ENV | |
- name: DOCKER | Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: v0.9.1 | |
- name: DOCKER | Build and push docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
builder: ${{ steps.buildx.outputs.name }} | |
file: ./Dockerfile | |
push: true | |
tags: | | |
public.ecr.aws/p6e8q1z1/ink-dev:${{ env.IMAGE_TAG }} | |
public.ecr.aws/p6e8q1z1/ink-dev:latest |