Skip to content

Commit

Permalink
docs: GITHUB_RUN_ID set by default
Browse files Browse the repository at this point in the history
although this is not documented in the github api :eyeroll:
  • Loading branch information
rokroskar committed Feb 3, 2020
1 parent 73f6e1b commit 110a9a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ GitHub actions.

None. The action uses the GitHub action environment variables
to obtain the workflow name and branch. You must, however,
set the `GITHUB_TOKEN` and `GITHUB_RUN_ID` environment variables:
set the `GITHUB_TOKEN` environment variable:

## Example usage

```yaml
uses: rokroskar/workflow-run-cleanup-action
env:
GITHUB_TOKEN: ${{ secret.GITHUB_TOKEN }}
GITHUB_RUN_ID: ${{ github.run_id }}
```
You may want to disable this action from running on tags or master,
Expand All @@ -36,7 +35,6 @@ on:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_RUN_ID: ${{ github.run_id }}
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
...
other-jobs:
Expand Down

0 comments on commit 110a9a2

Please sign in to comment.