diff --git a/.github/workflows/dispatcher.yml b/.github/workflows/dispatcher.yml index 647afa9..d277c6b 100644 --- a/.github/workflows/dispatcher.yml +++ b/.github/workflows/dispatcher.yml @@ -1,4 +1,4 @@ -name: Delayed Trigger +name: ⏰ Delayed Trigger on: push: @@ -22,16 +22,16 @@ jobs: CURRENT_COMMIT=${{ github.sha }} if [ "$LATEST_COMMIT" != "$CURRENT_COMMIT" ]; then echo "Newer commit found. Stopping workflow." - echo "::set-output name=stop::true" + echo "::set-output name=abort::true" fi - name: ⚡ Trigger main workflow - if: steps.check-commits.outputs.stop != 'true' + if: steps.check-commits.outputs.abort != 'true' run: | curl -X POST \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/actions/workflows/sync-s3-posts.yml/dispatches \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/ShafSpecs/journal-stack/actions/workflows/sync-s3-posts/dispatches \ -d "{\"ref\":\"main\"}" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/sync-s3-posts.yml b/.github/workflows/sync-s3-posts.yml index 6f96c49..8b75d32 100644 --- a/.github/workflows/sync-s3-posts.yml +++ b/.github/workflows/sync-s3-posts.yml @@ -1,7 +1,6 @@ name: 🔁 Sync docs with S3 -on: - workflow_dispatch: +on: workflow_dispatch jobs: build: