Move the logic that invokes setup-fortran.sh
out of the action YAML and into a reusable script
#123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, all of the logic for interacting with
setup-fortran.sh
is embedded within the YAML file of the Action definition. This logic should ideally be reusable by others, and it's not easily reusable in its current form as its not accessible outside of the YAML.This PR moves the logic into its own shell script, and updates the YAML to invoke it.
Why am I suggesting this change? I have a use case where I'm building my own CI images using
setup-fortran.sh
, and I want to be able to reuse this entry logic in my own scripts. What I'd like to be able to get to is have a Dockerfile like as follows, which works the same way as using this action does:If we could get to this point, then the pattern I'm setting up here lends itself towards a partial solution for #98. People can setup their own pre-built CI images, reusing the same logic that the Action uses when running on GHA's
ubuntu-latest
image to setup the Fortran compilers. This is exactly what I'm currently doing. CI time for my own project is down from ~2-5 minutes to ~20 seconds using pre-built images.