unison/docs/github-actions-help.md
2024-02-15 19:42:03 -05:00

21 lines
797 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Some things I wish I'd known about Github Actions
You can't have an `env:` key defined in terms of another `env` key, but
You can't define a `matrix` at the top level, it has to be defined within a `job`'s `strategy`.
Windows doesn't seem to honor the `default: run: shell:` setting, so you need to set the `shell:` on `run:` manually?
Don't hesitate to do a lot with `run:` blocks aka bash scripts — at least bash is mature and well documented.
e.g.
echo "bar=whatever" >> $GITHUB_OUTPUT
# access with `steps.<name>.outputs.bar` in yaml strings
echo "foo=whatever" >> $GITHUB_ENV
# access with `env.foo` in yaml strings, or `$foo` in bash
Default Environment Variables:
https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables