Skip to content

Commit

Permalink
display trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
nhuet committed Apr 30, 2024
1 parent 69d112a commit ae2a819
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,22 @@ jobs:
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.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}" >> $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]
Expand Down

0 comments on commit ae2a819

Please sign in to comment.