Skip to content

Commit

Permalink
Merge branch 'enhancement/commitCheckWorkflowDeployment'
Browse files Browse the repository at this point in the history
  • Loading branch information
mvomiero committed Jul 25, 2024
2 parents 5a5c2ab + 8bccdd7 commit 94d1923
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check-for-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check for Updates

on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'

jobs:
verify_commit:
runs-on: ubuntu-latest
outputs:
RUN_BUILD: ${{ steps.verify_commit.outputs.RUN_BUILD }}
steps:
- uses: actions/checkout@v3
- id: verify_commit
run: |
if git log --since='24 hours ago' --oneline | grep '.'; then
echo "::set-output name=RUN_BUILD::true"
else
echo "::set-output name=RUN_BUILD::false"
fi
trigger_build:
runs-on: ubuntu-latest
needs: verify_commit
if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
steps:
- name: Trigger Nightly Build Workflow
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/nightly-build.yml/dispatches \
-d '{"ref":"main"}'

0 comments on commit 94d1923

Please sign in to comment.