By git cloning the bats-core repository locally and building the Dockerfile with the build argument bashver to point to a specific bash Docker image tag, it is possible to use a specific alpine version, which in turn let's us use a specific Python version.
We want to use the latest possible alpine version that uses Python 3.9 (as this is currently the minimum supported version for OPTIMADE Python tools). This alpine version is 3.15 (see the packages overview for confirmation, searching for python3, changing the branch accordingly).
Another, future, solution here, would be to build the custom BATS Docker image "once" and upload it to the GitHub container repository and use it there. I suggest doing this in another PR, however, for now. An issue should be opened for this around the merge-time of this PR.
Finally, as a bonus, the set-output usage has been replaced with redirecting to the GITHUB_OUTPUT environment variable (if the GITHUB_ACTIONS environment variable is true, as it will always be when running in GitHub Actions).
Fixes #142 Fixes #123
By git cloning the bats-core repository locally and building the Dockerfile with the build argument
bashver
to point to a specific bash Docker image tag, it is possible to use a specific alpine version, which in turn let's us use a specific Python version.We want to use the latest possible alpine version that uses Python 3.9 (as this is currently the minimum supported version for OPTIMADE Python tools). This alpine version is 3.15 (see the packages overview for confirmation, searching for
python3
, changing the branch accordingly).Another, future, solution here, would be to build the custom BATS Docker image "once" and upload it to the GitHub container repository and use it there. I suggest doing this in another PR, however, for now. An issue should be opened for this around the merge-time of this PR.
Finally, as a bonus, the
set-output
usage has been replaced with redirecting to theGITHUB_OUTPUT
environment variable (if theGITHUB_ACTIONS
environment variable istrue
, as it will always be when running in GitHub Actions).Note, this also ignores the safety ID related to jinja2, see https://github.com/advisories/GHSA-f6pv-j8mr-w6rr for more information.