Skip to content

Commit

Permalink
feat: test ci for hasura
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Sep 15, 2023
1 parent 58ffa5f commit 3441217
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
workflow_dispatch:
push:
branches: [develop, staging]
branches: [develop, staging, test-hasura-ci]
jobs:
lint:
uses: ./.github/workflows/lint.yml
Expand All @@ -30,8 +30,11 @@ jobs:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
fetch-depth: 2
PATTERNS: |
hasura/**
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
Expand All @@ -44,15 +47,8 @@ jobs:
run: |
SHORT_SHA_COMMIT=$(git rev-parse --short HEAD)
echo CONTAINER_RELEASE_IMAGE=ghcr.io/aura-nw/horoscope-hasura:${GITHUB_REF_NAME}_${SHORT_SHA_COMMIT} >> $GITHUB_ENV
- name: Check hasura changes
id: NUMBER_CHANGES
run: |
STATUS=`git diff HEAD^ HEAD hasura`
NUMBER_CHANGES=${#STATUS}
echo $NUMBER_CHANGES
echo NUMBER_CHANGES=$NUMBER_CHANGES >> $GITHUB_OUTPUT
- name: Build and push
if: ${{steps.NUMBER_CHANGES.outputs.NUMBER_CHANGES != 0}}
if: env.GIT_DIFF
uses: docker/build-push-action@v4
with:
file: Dockerfile.hasura
Expand Down

0 comments on commit 3441217

Please sign in to comment.