Closed Clockwork-Muse closed 3 hours ago
Okay, it turns out that the environment variable is available there, the following works:
- name: Run check
if: steps.bump.outputs.version != env.PREVIOUS_REVISION
run: |
echo "whatever"
(I'm still figuring out some aspects of GitHub actions and their expressions)
.... VSCode does complain pretty loudly about the reference potentially not being available, though...
I'm not sure why github reports this. I'm glad it works, feel free to open again
I'm trying to condition following steps in my workflow to only run if a bump occurred. To that end, it would be nice if there was an output available, so I could do something like the following:
... and/or some boolean output I could refer to afterwards (but knowing the previous version is useful generally).
I'm aware of the
PREVIOUS_VERSION
environment variable, however it's not available forif
checks there, and autocomplete in VSCode of course complains it doesn't exist.