Skip to content

fix display

fix display #134

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.outputs.is_release }}
echo is_push_on_default_branch=${{ needs.trigger.outputs.is_push_on_default_branch }}
echo is_schedule=${{ needs.trigger.outputs.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 }}