Open djarran opened 1 week ago
We attempted to fix this issue with PR #117 (contains explanation of changes). This was tested with nekos/act to run the Action locally to ensure that the ternary was evaluated correctly. It seems like nekos/act is not 100% representation of Github Action execution as it was still not evaluating correctly.
The latest change as part of #118 uses a fixed number for fetch-depth
Description: We are experiencing the following error in the GitHub Action for mod_scormremote.
The issue appears to be occurring due to this step/line of
CI.yml
hereCurrently, the
fetch-depth
conditional is not being evaluated correctly. It uses a ternary operator and so if bothcontains(github.event_name, 'push')
andsteps.check-branch.outputs.publishable == 'true'
are true, it should return0
. However, it is returning2
as seen in the debug logs below:It is altering the conditional by moving the closing brace to surround the![image](https://github.com/catalyst/catalyst-moodle-workflows/assets/65814885/eaa95530-91ae-4ec4-9ff8-68a0a0c094ee)
0
as well so that the only possible result to return is2
. This means that this step is only fetching the latest two commits. In the case ofmod_scormremote
, fetching only the last two commits is not enough to find previous SHA37eed5f
Note that setting
fetch-depth
to0
is recommended here