Skip to content

Merge pull request #430 from smartcontractkit/BCF-3203-lint-containedctx #60

Merge pull request #430 from smartcontractkit/BCF-3203-lint-containedctx

Merge pull request #430 from smartcontractkit/BCF-3203-lint-containedctx #60

name: "Build and push on-chain monitor image to ECR"
on:
push:
branches:
- develop
paths:
- monitoring/**
- relayer/**
jobs:
build-and-publish-monitoring:
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_ARN }}
role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to ECR
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ secrets.MONITORING_ECR_HOSTNAME }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Generate docker metadata
id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
flavor: | # prevent auto tagging with latest
latest=false
images: ${{ secrets.MONITORING_ECR_HOSTNAME }}
tags: type=sha,format=long
- name: Build and push docker image
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
push: true
context: ./
file: monitoring/ops/Dockerfile
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}