revisiting github actions

We added github actions in May and then caught an actual regression a few months later. Now the life cycle has come around to fixing a weird deprecation. I identified how charmingly insane their set/get key/value system was so it looks like they overhauled it.

Clicking through onto the Actions tab showed me that the set-output command was deprecated. On their blog they have an explanation, basically instead of the weirdo set-output command and having to reference the uid of the step, now you can arbitrarily store key/value pairs into an environment. I’m not sure why they didn’t use a common shell verb like “set” or “export” but whatever.

Here’s what a diff looks like:

diff --git a/.github/workflows/full-results-regression.yml b/.github/workflows/full-results-regression.yml
index 6f66ae7..3a084be 100644
--- a/.github/workflows/full-results-regression.yml
+++ b/.github/workflows/full-results-regression.yml
@@ -34,7 +34,7 @@ jobs:
         run: /usr/bin/cat output.txt
       - name: Check md5
         id: check_md5
-        run: echo "::set-output name=md5_out::"`/usr/bin/md5sum output.txt | /usr/bin/cut -d ' ' -f 1`
+        run: echo "md5_out="`/usr/bin/md5sum output.txt | /usr/bin/cut -d ' ' -f 1` >> $GITHUB_ENV
       - name: Pass or fail
         run: |
-          if [[ "${{ steps.check_md5.outputs.md5_out }}" == "$RESULTS_MD5" ]]; then exit 0; else exit 1; fi
+          if [[ "${{ env.md5_out }}" == "$RESULTS_MD5" ]]; then exit 0; else exit 1; fi

The only other wrinkle was that their built-in setup-python helper script was also triggering the deprecation warning. It turns out the script itself got a major version upgrade that I found through some blundering searches. Not sure how that upgrade cycle is really supposed to work but it’s all very findable (on github, of course.)

Regressions back to running with all green checks.

Published
Categorized as code