Skip to content

Check Scheduled Posts #23584

Check Scheduled Posts

Check Scheduled Posts #23584

name: Check Scheduled Posts
on:
schedule:
- cron: "0 * * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Execute check for scheduled posts
shell: bash
id: schedule-check
run: |
chmod +x detectScheduledPosts.sh
./detectScheduledPosts.sh
if [ $? -eq 42 ]; then
echo 'There is an scheduled post! Will publish the blog...'
echo '::set-output name=EXECUTE_WORKFLOW::true'
else
echo 'No scheduled posts detected...'
fi
- uses: convictional/trigger-workflow-and-wait@master
if: ${{ steps.schedule-check.outputs.EXECUTE_WORKFLOW == 'true' }}
with:
owner: piraces
repo: blog
github_token: ${{ secrets.PAT }}