Skip to content

Set AWS login to use OIDC #33

Set AWS login to use OIDC

Set AWS login to use OIDC #33

Workflow file for this run

name: "AWS ECR: pingpub"
on:
push:
branches:
- "chains/xion"
workflow_dispatch:
jobs:
build:
name: Build Image
runs-on: ubuntu-latest
environment: CI
permissions:
id-token: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_OIDC_ROLE }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: 385156030167.dkr.ecr.us-east-1.amazonaws.com/burnt/pingpub
tags: |
type=semver,pattern={{version}},priority=1000
type=sha,priority=700
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max