Skip to content

Commit 94d5f83

Browse files
sam bachaonbjerg
andauthored
feat(action): step summary (#6)
* 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 <hi@notbjerg.me>
1 parent a6bacf1 commit 94d5f83

File tree

7 files changed

+374
-12
lines changed

7 files changed

+374
-12
lines changed

.github/workflows/nodejs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: nodejs
2+
3+
on:
4+
push:
5+
paths:
6+
- "**/**"
7+
- "!**/*.md/**"
8+
jobs:
9+
pipeline:
10+
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
node-version: ['16.x']
17+
os: ['ubuntu-latest']
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
26+
- name: Install dependencies
27+
run: npm install
28+
id: install
29+
30+
- name: Build project
31+
run: npm run build
32+
id: production

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## `foundry-toolchain` Action
22

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

55
### Example workflow
66

@@ -25,10 +25,27 @@ jobs:
2525

2626
- name: Run tests
2727
run: forge test -vvv
28+
29+
- name: Run snapshot
30+
run: forge snapshot
2831
```
2932
3033
### Inputs
3134
3235
| **Name** | **Required** | **Description** | **Type** |
3336
|-----------|--------------|---------------------------------------------------------------------------------------------------------------|----------|
3437
| `version` | Yes | Version to install, e.g. `nightly` or `1.0.0`. **Note:** Foundry only has nightly builds for the time being. | string |
38+
39+
40+
### Summaries
41+
42+
You can add the output of Forge and Cast commands to GitHub step summaries. The summaries support GitHub flavored Markdown.
43+
44+
For example, to add the output of `forge snapshot` to a summary, you would change the snapshot step to:
45+
46+
```yml
47+
- name: Run snapshot
48+
run: forge snapshot >> $GITHUB_STEP_SUMMARY
49+
```
50+
51+
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.

dist/index.js

Lines changed: 303 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sourcemap-register.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)