Skip to content

schedule every 5'

schedule every 5' #132

Workflow file for this run

name: Build workflow-testing
on:
push:
branches:
- "**"
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
schedule:
- cron: '*/5 * * * *'
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
trigger:
# store trigger reason
runs-on: ubuntu-latest
outputs:
is_release: ${{ steps.reason.outputs.is_release }}
is_push_on_default_branch: ${{ steps.reason.outputs.is_push_on_default_branch }}
is_schedule: ${{ steps.reason.outputs.is_schedule }}
steps:
- id: reason
run: |
echo "is_release=${{ startsWith(github.ref, 'refs/tags/v') }}" >> $GITHUB_OUTPUT
echo "is_push_on_default_branch=${{ (github.event_name == 'push') && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }}" >> $GITHUB_OUTPUT
echo "is_schedule="${{ github.event_name == 'schedule' }} >> $GITHUB_OUTPUT
display-trigger:
needs: trigger
runs-on: ubuntu-latest
steps:
- run: |
echo is_release=${{ needs.trigger.is_release }}
echo is_push_on_default_branch=${{ needs.trigger.is_push_on_default_branch }}
echo is_schedule=${{ needs.trigger.is_schedule }}
only-on-master:
needs: [trigger]
runs-on: ubuntu-latest
if: needs.trigger.outputs.is_push_on_default_branch == 'true'
outputs:
notebooks-branch: ${{ steps.write-output.outputs.notebooks_branch }}
steps:
- id: write-output
run: |
echo "yo"
echo "notebooks_branch=toto" >> $GITHUB_OUTPUT
on-all-branches:
needs: only-on-master
runs-on: ubuntu-latest
if: always()
steps:
- run: echo yo ${{ needs.only-on-master.outputs.notebooks-branch }}