From 5ed3544b166b4fa33f4bde923e9aed32b404e326 Mon Sep 17 00:00:00 2001 From: stam Date: Sun, 17 Jan 2021 03:10:57 +0300 Subject: [PATCH] Update json-master.yml --- .github/workflows/json-master.yml | 33 +++++++++---------------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/.github/workflows/json-master.yml b/.github/workflows/json-master.yml index e7d648e..2274f50 100644 --- a/.github/workflows/json-master.yml +++ b/.github/workflows/json-master.yml @@ -41,34 +41,19 @@ jobs: ls -las ./update.sh cd .. - + - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Atlassian JSON Autoupdated commit_user_name: stamepicmorg # defaults to "GitHub Actions" commit_user_email: stamepicmorg@users.noreply.github.com # defaults to "actions@github.com" commit_author: stamepicmorg # defaults to author of the commit that triggered the run + - name: "Run if changes have been detected" + if: steps.auto-commit-action.outputs.changes_detected == 'true' + run: | + echo "Changes!" + curl -s --data-urlencode -X POST ${{ secrets.TLG_URL }} -d chat_id=${{ secrets.TLG_CHAT }} -d text="${{ secrets.TLG_TEXT }}" -d "parse_mode=HTML" >> /dev/null -# git add . -# git commit -am "Atlassian JSON autoupdated" -# git push -# exit 0 - # - name: Commit and push changes - # uses: devops-infra/action-commit-push@master - # with: - # github_token: ${{ secrets.GHT }} - # commit_message: Atlassian JSON updated - # - # - name: Create Release - # id: create_release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GHT }} - # with: - # tag_name: ${{ env.RELEASE_DATE }} - # release_name: Release ${{ env.RELEASE_DATE }} - # body: | - # Changes in this Release - # - Atlassian JSON updated ${{ env.RELEASE_DATE }} - # draft: false - # prerelease: false + - name: "Run if no changes have been detected" + if: steps.auto-commit-action.outputs.changes_detected == 'false' + run: echo "No Changes!" \ No newline at end of file