unison/docs/github-actions-help.md

21 lines
797 B
Markdown
Raw Normal View History

2024-02-15 14:39:18 +03:00
## 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?
2024-02-16 03:42:03 +03:00
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