Skip to content

Commit

Permalink
feat(action): step summary (#6)
Browse files Browse the repository at this point in the history
* feat(action): step summary (#2)

* docs(readme): update

* docs: revert header

The edit link is already present on the same page
as the README.

* docs: explain gh step summaries

Co-authored-by: Oliver Nordbjerg <[email protected]>
  • Loading branch information
sam bacha and onbjerg authored May 10, 2022
1 parent a6bacf1 commit 94d5f83
Show file tree
Hide file tree
Showing 7 changed files with 374 additions and 12 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: nodejs

on:
push:
paths:
- "**/**"
- "!**/*.md/**"
jobs:
pipeline:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: ['16.x']
os: ['ubuntu-latest']

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install
id: install

- name: Build project
run: npm run build
id: production
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## `foundry-toolchain` Action

This GitHub action installs [Foundry](https://github.com/foundry-rs/foundry).
This GitHub Action installs [Foundry](https://github.com/foundry-rs/foundry).

### Example workflow

Expand All @@ -25,10 +25,27 @@ jobs:

- name: Run tests
run: forge test -vvv

- name: Run snapshot
run: forge snapshot
```
### Inputs
| **Name** | **Required** | **Description** | **Type** |
|-----------|--------------|---------------------------------------------------------------------------------------------------------------|----------|
| `version` | Yes | Version to install, e.g. `nightly` or `1.0.0`. **Note:** Foundry only has nightly builds for the time being. | string |


### Summaries

You can add the output of Forge and Cast commands to GitHub step summaries. The summaries support GitHub flavored Markdown.

For example, to add the output of `forge snapshot` to a summary, you would change the snapshot step to:

```yml
- name: Run snapshot
run: forge snapshot >> $GITHUB_STEP_SUMMARY
```

See the offical [GitHub docs](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary) for more information.
305 changes: 303 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/sourcemap-register.js

Large diffs are not rendered by default.

Loading

0 comments on commit 94d5f83

Please sign in to comment.