Closed edasmalchi closed 11 months ago
see https://docs.github.com/en/actions/learn-github-actions/contexts#about-contexts, https://docs.github.com/en/actions/learn-github-actions/expressions
more verbose option to test: if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && inputs.site_target == 'dev')}}
I tried adding manual Workflow Dispatch triggers to the site build GH action in #279, but it doesn't quite work as-intended. When triggering manually, dev actions always run regardless of dev/prod selection, and prod site deploy will not run at all.
if: ${{ github.ref == 'refs/heads/main' || inputs.site_target == 'dev'}}
conditionals always evaluate to true, even when triggered with workflow_dispatchgithub.ref
is'refs/heads/main'
. One option would be to make check trigger (push, tag, workflow_dispatch) in additionhttps://github.com/cal-itp/reports/blob/8d0403a8e0c1a2a8c5d32679bd028607488b4a2c/.github/workflows/main.yml#L48C7-L48C79
||
operator should be outside parens:https://github.com/cal-itp/reports/blob/8d0403a8e0c1a2a8c5d32679bd028607488b4a2c/.github/workflows/main.yml#L79C43-L79C43