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

test cicd

test cicd #1

Workflow file for this run

name: CI
on:
push:
branches:
- v1.37.0
jobs:
build:
name: build
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@v4
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:${git_hash} -t $ECR_REPOSITORY:latest .
docker push $ECR_REPOSITORY --all-tags