-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 9349832.
- Loading branch information
1 parent
9349832
commit 078dec0
Showing
15 changed files
with
882 additions
and
505 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: API Deploy to Amazon ECR | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "api/**" | ||
workflow_dispatch: | ||
|
||
env: | ||
ecr_url: public.ecr.aws/bisonai/orakl-api | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare Build | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
tag_date: ${{ steps.tag.outputs.date }} | ||
tag_git_hash: ${{ steps.tag.outputs.git_hash }} | ||
version: ${{ steps.package.outputs.version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get time TAG | ||
id: tag | ||
run: | | ||
echo "date=$(date +'%Y%m%d.%H%M')" >> $GITHUB_OUTPUT | ||
echo "git_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Get package version | ||
id: package | ||
run: | | ||
version=$(cat "./api/.version") | ||
echo "version=${version}" >> $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: | | ||
./api/go.sum | ||
- name: Docker build orakl-api | ||
run: SERVICE_NAME=orakl-api 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(api) | ||
run: | | ||
docker tag orakl-api ${{ env.ecr_url }}:latest | ||
docker push ${{ env.ecr_url }}:latest | ||
docker tag ${{ env.ecr_url}}:latest ${{ env.ecr_url }}:v${{ needs.prepare.outputs.version }}.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} | ||
docker push ${{ env.ecr_url }}:v${{ needs.prepare.outputs.version }}.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} | ||
# After Migration => uncommented | ||
# create-helmchart-pr: | ||
# needs: [prepare, build] | ||
# uses: ./.github/workflows/create-helmchart-pr.yaml | ||
# with: | ||
# project-name: "api" | ||
# version: ${{ needs.prepare.outputs.version }} | ||
# tag_date: ${{ needs.prepare.outputs.tag_date }} | ||
# tag_git_hash: ${{ needs.prepare.outputs.tag_git_hash }} | ||
# secrets: | ||
# PAT: ${{ secrets.PAT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Boot API Deploy to Amazon ECR | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "node/pkg/boot/**" | ||
- "node/cmd/boot_api/**" | ||
workflow_dispatch: | ||
|
||
env: | ||
ecr_url: public.ecr.aws/bisonai/orakl-boot-api | ||
|
||
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-boot-api | ||
run: SERVICE_NAME=orakl-boot-api 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(boot-api) | ||
run: | | ||
docker tag orakl-boot-api ${{ 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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: CLI Deploy to Amazon ECR | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "cli/**" | ||
workflow_dispatch: | ||
|
||
env: | ||
ecr_url: public.ecr.aws/bisonai/orakl-cli | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare Build | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
tag_date: ${{ steps.tag.outputs.date }} | ||
tag_git_hash: ${{ steps.tag.outputs.git_hash }} | ||
version: ${{ steps.package.outputs.version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get time TAG | ||
id: tag | ||
run: | | ||
echo "date=$(date +'%Y%m%d.%H%M')" >> $GITHUB_OUTPUT | ||
echo "git_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Get package version | ||
id: package | ||
run: | | ||
echo "version=$(node -p -e "require('./cli/package.json').version")" >> $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: Docker build orakl-cli | ||
run: SERVICE_NAME=orakl-cli 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(cli) | ||
run: | | ||
docker tag orakl-cli ${{ env.ecr_url }}:latest | ||
docker push ${{ env.ecr_url }}:latest | ||
docker tag ${{ env.ecr_url }}:latest ${{ env.ecr_url }}:v${{ needs.prepare.outputs.version }}.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} | ||
docker push ${{ env.ecr_url }}:v${{ needs.prepare.outputs.version }}.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} | ||
create-helmchart-pr: | ||
needs: [prepare, build] | ||
uses: ./.github/workflows/create-helmchart-pr.yaml | ||
with: | ||
project-name: "cli" | ||
version: ${{ needs.prepare.outputs.version }} | ||
tag_date: ${{ needs.prepare.outputs.tag_date }} | ||
tag_git_hash: ${{ needs.prepare.outputs.tag_git_hash }} | ||
secrets: | ||
PAT: ${{ secrets.PAT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Core Deploy to Amazon ECR | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "core/**" | ||
workflow_dispatch: | ||
|
||
env: | ||
ecr_url: public.ecr.aws/bisonai/orakl-core | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare Build | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
tag_date: ${{ steps.tag.outputs.date }} | ||
tag_git_hash: ${{ steps.tag.outputs.git_hash }} | ||
version: ${{ steps.package.outputs.version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get time TAG | ||
id: tag | ||
run: | | ||
echo "date=$(date +'%Y%m%d.%H%M')" >> $GITHUB_OUTPUT | ||
echo "git_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Get package version | ||
id: package | ||
run: | | ||
echo "version=$(node -p -e "require('./core/package.json').version")" >> $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: Docker build orakl-core | ||
run: SERVICE_NAME=orakl-core 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(core) | ||
run: | | ||
docker tag orakl-core ${{ env.ecr_url }}:latest | ||
docker push ${{ env.ecr_url }}:latest | ||
docker tag ${{ env.ecr_url }}:latest ${{ env.ecr_url }}:v${{ needs.prepare.outputs.version }}.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} | ||
docker push ${{ env.ecr_url }}:v${{ needs.prepare.outputs.version }}.${{ needs.prepare.outputs.tag_date }}.${{ needs.prepare.outputs.tag_git_hash }} | ||
create-helmchart-pr: | ||
needs: [prepare, build] | ||
uses: ./.github/workflows/create-helmchart-pr.yaml | ||
with: | ||
project-name: "aggregator" | ||
version: ${{ needs.prepare.outputs.version }} | ||
tag_date: ${{ needs.prepare.outputs.tag_date }} | ||
tag_git_hash: ${{ needs.prepare.outputs.tag_git_hash }} | ||
secrets: | ||
PAT: ${{ secrets.PAT }} |
Oops, something went wrong.