Act env (#417)
* Test more if env variants * The correct negation syntax is != * Make the Interpolate function support negated booleans from envs * Move assert := a.New(t) into t.Run This uncovered that some of the test premisses was wrong and the Eval Bool function also had flaws * Remove a stray logrus import * Add an ACT env set to true This can be used to skip certain steps that you don't want to run locally when testing. E.g. steps that sends messages to Slack channels on successful builds etc. * Add a description about env.ACT to the readme * A new attempt at Interpolation and EvalBool * One small merge fix * Remove some fmt.Printfs * Fix some merge conflicts
This commit is contained in:
12
README.md
12
README.md
@@ -166,6 +166,18 @@ Additionally, act supports loading environment variables from an `.env` file. Th
|
||||
act --env-file my.env
|
||||
```
|
||||
|
||||
# Skipping steps
|
||||
|
||||
Act adds a special environement variable `ACT` that can be used to skip a step that you
|
||||
don't want to run locally. E.g. a step that posts a Slack message or bumps a version number.
|
||||
|
||||
```yml
|
||||
- name: Some step
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
...
|
||||
```
|
||||
|
||||
# Events
|
||||
|
||||
Every [GitHub event](https://developer.github.com/v3/activity/events/types) is accompanied by a payload. You can provide these events in JSON format with the `--eventpath` to simulate specific GitHub events kicking off an action. For example:
|
||||
|
Reference in New Issue
Block a user