jackchuong is building api 🚀 #25
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: build api | |
run-name: ${{ github.actor }} is building api 🚀 | |
on: | |
workflow_dispatch: | |
# Some objects are defined but never used lead to warnings when build | |
# Treating warnings as errors because process.env.CI = true ==> step build api exit code 1 and fail | |
# temporary fix by set process.env.CI = false | |
env: | |
CI: false | |
jobs: | |
build-push-docker-image: | |
runs-on: ubuntu-latest | |
environment: | |
name: mainnet | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
#- name: Check out wallets repository code | |
# uses: actions/checkout@v4 | |
# with: | |
# repository: saigonbitmaster/wallets.git | |
# ref: 'master' | |
# token: ${{ secrets.PAT }} | |
# path: './api/src/flatworks/shellscripts/' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks | |
username: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
#username: ${{ secrets.DOCKERHUB_USERNAME }} | |
#password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ${{ vars.API_MAINNET_TAG }} | |
#tags: 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:api-testnet | |
#tags: jackchuong/itl:bworks-api-testnet | |
context: . | |
file: ./docker-configs/Dockerfile-api | |
- run: echo "🍏 This job's status is ${{ job.status }}." |