Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Merge branch 'main' of https://github.com/klaytn/klaytn-safe-transact… #1

Merge branch 'main' of https://github.com/klaytn/klaytn-safe-transact…

Merge branch 'main' of https://github.com/klaytn/klaytn-safe-transact… #1

name: klaytn-safe-txn deploy workflow
on:
push:
branches:
- main
jobs:
deploy:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Get AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE_ARN_DEV }}
role-session-name: SessionForKlaytnActions
aws-region: ${{ secrets.AWS_REGION_DEV }}
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
id: login-ecr
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY_DEV }}
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
docker build -t $ECR_REPOSITORY:${GITHUB_REF_NAME}.${git_hash} -t $ECR_REPOSITORY:latest -f docker/web/Dockerfile .
docker push $ECR_REPOSITORY --all-tags