Update rdb pkg structure (#1529) #78
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: Orakl Node Deploy to Amazon ECR | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "node/**" | |
workflow_dispatch: | |
env: | |
ecr_url: public.ecr.aws/bisonai/orakl-node | |
jobs: | |
prepare: | |
name: Prepare Build | |
runs-on: ubuntu-latest | |
outputs: | |
tag_date: ${{ steps.tag.outputs.date }} | |
tag_git_hash: ${{ steps.tag.outputs.git_hash }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get time TAG | |
id: tag | |
run: | | |
echo "date=$(date -u +'%Y%m%d.%H%M')" >> $GITHUB_OUTPUT | |
echo "git_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: prepare | |
permissions: | |
id-token: write | |
contents: read | |
outputs: | |
tag_date: ${{ steps.tag.outputs.date }} | |
tag_git_hash: ${{ steps.tag.outputs.git_hash }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22.3" | |
check-latest: true | |
cache-dependency-path: | | |
./node/go.sum | |
./node/go.mod | |
- name: Docker build orakl-node | |
run: SERVICE_NAME=orakl-node docker compose -f docker-compose.build.yaml build | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: ${{ secrets.ROLE_ARN }} | |
- name: Login to Amazon ECR | |
id: login-ecr-public | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
- name: Publish Image to ECR(orakl-node) | |
run: | | |
docker tag orakl-node ${{ env.ecr_url }}:latest | |
docker push ${{ env.ecr_url }}:latest | |
docker tag ${{ env.ecr_url }}:latest ${{ env.ecr_url }}:v0.0.1.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} | |
docker push ${{ env.ecr_url }}:v0.0.1.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} |