From 6756af882411d48f22044aeba1b06aaaa7ec6393 Mon Sep 17 00:00:00 2001 From: kuroweb Date: Thu, 1 Aug 2024 08:57:38 +0900 Subject: [PATCH] feat: update --- .github/workflows/cd.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6d057933..9fb4a263 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -7,8 +7,22 @@ on: branches: [master] jobs: + check_changed: + runs-on: ubuntu-20.04 + outputs: + backend_diff: ${{ steps.backend_diff.outputs.changed }} + steps: + - uses: actions/checkout@v3 + - run: git fetch origin master --depth=1 + - id: backend_diff + run: | + CHANGED=$(git diff --name-only origin/master HEAD --relative ./volumes/backend/ | wc -l) + echo "::set-output name=changed::$CHANGED" + backend: runs-on: ubuntu-20.04 + needs: check_changed + if: needs.check_changed.outputs.backend_diff != '0' steps: - name: Checkout Repository uses: actions/checkout@v3