Commit 5b28a7cd authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): add auto cancel

parent b3a87be8
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -70,16 +70,19 @@ jobs:
          git config user.name 'narugo1992'
          git config user.email 'narugo@126.com'
          git add -A
          (git diff-index --quiet HEAD && echo "HAS_CHANGE=" >> $GITHUB_ENV) || echo "HAS_CHANGE=yes" >> $GITHUB_ENV
          git diff-index --quiet HEAD || git commit -a -m "dev(narugo): auto sync $(date -R)"
      - name: Push changes
        if: ${{ env.HAS_CHANGE }}
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
      - name: Cancel current workflow
        if: ${{ env.HAS_CHANGE }}
        uses: andymckay/cancel-action@master

  doc:
    runs-on: ubuntu-latest
    needs:
      - contents
    if: "!contains(github.event.head_commit.message, 'ci skip')"
    strategy:
      matrix: