Skip to content

Commit

Permalink
πŸ™ Updated workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ShafSpecs committed Jan 26, 2024
1 parent e2d59c3 commit 0df0b70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/dispatcher.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Delayed Trigger
name: ⏰ Delayed Trigger

on:
push:
Expand All @@ -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 }}
3 changes: 1 addition & 2 deletions .github/workflows/sync-s3-posts.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: πŸ” Sync docs with S3

on:
workflow_dispatch:
on: workflow_dispatch

jobs:
build:
Expand Down

0 comments on commit 0df0b70

Please sign in to comment.