Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 2

Can't view log for failed action

Solved! Go to Solution.

I have an action that runs on issue_comment events. It has a single job, that is supposed to run conditionally, based on whether or not the comment begins with a magic word.

 

This was working for a while, but sometime about a week ago it broke, and now this action is showing up as a failure every time anyone comments on a PR; but more importantly I can't view the output for these job runs. They show up in the overall 'Actions list', but if I click on them I am taken to a focus view (it looks like based on the commit they were triggered for?) and the failures are not listed.

 

This is mostly a problem because my collaborators get spammed with constant failure notices.

 

1 Reply
Solution
Pilot Lvl 2
Message 2 of 2

Re: Can't view log for failed action

There's no logs to see, it's just wrong status set. Click.

 

What you can do before fix, is to change your "if" in a way that tests will be done by shell, and add extra variable to "env" context if all conditions are satisfied.

steps:
- name:  Check Things
run: | if [ "${{ github.event_name }}" == "this" ] || [ "something" == "else" ]; then echo ::set-env name=RUN_JOB::true fi shell: bash

 

Next, update all other steps with extra "if" checking environment variable:

- name: Do Things
  if:   env.RUN_JOB == 'true'
  run:  things.exe

 

You'll get old. behavior (no spam if job shouldn't run) at a price of running workflow for a second or two for each trigger. Easy to revert once we get a fix.