FidelusAleksander / ghcertified

Prepare for GitHub Certification exams!
https://ghcertified.com/
MIT License
433 stars 146 forks source link

GitHub Actions Question 101 #250

Closed alvarogarciapiz closed 4 months ago

alvarogarciapiz commented 4 months ago

GitHub Actions test Question 101, is the provided answer correct? I'm getting started preparing for the GitHub Actions certification test and I don't know why the correct selected answer for this question is the one containing: "if: failure() && steps.run-tests.outcome == 'failure'" and not "steps.run-tests.outcome == 'failure'".

"if: failure()" seems redundant for me, I would go for the other option (maybe I'm missing something).

btw, actions/upload-artifact@v3 should point to @v4 in all 4 options.

FidelusAleksander commented 4 months ago

Hi @alvarogarciapiz thanks for raising the issue

Now that I think of it, maybe it is redundant

@dostonhamrakulov since you added that question, could you please comment on this?

alvarogarciapiz commented 4 months ago

I just read the official documentation and I think it is right what @dostonhamrakulov says, apparently if failure() is not included, the second step would never be executed because it would be skipped.

Looks good now to me 😃