Skip to content

feat: adds fallbackChainApiClient #3014

feat: adds fallbackChainApiClient

feat: adds fallbackChainApiClient #3014

name: "API CI"
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
should-validate:
uses: ./.github/workflows/reusable-should-validate.yml
with:
path: apps/api
validate:
needs: should-validate
if: needs.should-validate.outputs.enabled == 'true'
uses: ./.github/workflows/reusable-validate-app.yml
secrets: inherit
with:
app: api
test-build:
runs-on: ubuntu-latest
needs: should-validate
if: needs.should-validate.outputs.has_changes == 'true'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build the Docker image for API
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: packages/docker/script/dc.sh build api
api-ci:
runs-on: ubuntu-latest
needs: [should-validate, validate, test-build]
if: always()
steps:
- name: Check statuses
if: needs.should-validate.outputs.has_changes == 'true'
env:
VALIDATE_RESULT: ${{ needs.validate.result }}
TEST_BUILD_RESULT: ${{ needs.test-build.result }}
run: |
echo "Validate: $VALIDATE_RESULT"
echo "Test Build: $TEST_BUILD_RESULT"
if [[ "$VALIDATE_RESULT" != "success" || "$TEST_BUILD_RESULT" != "success" ]]; then
exit 1
fi