Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
feat: build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 2, 2021
1 parent 0c45a72 commit 623b016
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env または actionsの出力 から差分を得ることができます。
- [FROM, TO](#from-to)
- [下書きのプルリクエストで最新コミット差分のみをチェックする場合](#%E4%B8%8B%E6%9B%B8%E3%81%8D%E3%81%AE%E3%83%97%E3%83%AB%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%A7%E6%9C%80%E6%96%B0%E3%82%B3%E3%83%9F%E3%83%83%E3%83%88%E5%B7%AE%E5%88%86%E3%81%AE%E3%81%BF%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88)
- [Json形式で結果を取得する場合](#json%E5%BD%A2%E5%BC%8F%E3%81%A7%E7%B5%90%E6%9E%9C%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88)
- [相対パスを指定](#%E7%9B%B8%E5%AF%BE%E3%83%91%E3%82%B9%E3%82%92%E6%8C%87%E5%AE%9A)
- [Author](#author)

*generated with [TOC Generator](https://github.com/technote-space/toc-generator)*
Expand Down
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ You can get the differences via env or action output.
- [FROM, TO](#from-to)
- [Check only the latest commit differences in a draft Pull Request](#check-only-the-latest-commit-differences-in-a-draft-pull-request)
- [To get the result in Json format](#to-get-the-result-in-json-format)
- [Specify a relative path](#specify-a-relative-path)
- [Author](#author)

*generated with [TOC Generator](https://github.com/technote-space/toc-generator)*
Expand Down Expand Up @@ -270,13 +271,40 @@ jobs:

Result:
```shell
Run echo '["yarn.lock"]' | jq .
> Run echo '["yarn.lock"]' | jq .
[
"yarn.lock"
]
```

###
### Specify a relative path

GitHub Actions doesn't support `working-directory` for `uses`, so you can't run this action separately for monorepo configuration, etc. However, if you specify the `RELATIVE` option, it will be used as `--relative=<RELATIVE>` for `git diff`.

https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---relativeltpathgt

```yaml
on: pull_request
name: CI
jobs:
dump:
name: Dump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: '*.ts'
RELATIVE: 'src/abc'
- run: echo ${{ env.GIT_DIFF }}
```

If the files `src/abc/test1.ts`, `src/abc/test2.ts`, `src/abc/test3.txt`, and `src/test4.ts` exist, the result will be as follows:

```shell
> Run echo 'test1.ts' 'test2.ts'
test1.ts test2.ts
```

## Author
[GitHub (Technote)](https://github.com/technote-space)
Expand Down
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"owner":"technote-space","repo":"get-diff-action","sha":"FETCH_HEAD","ref":"refs/heads/master","tagName":"test/v4.1.3","branch":"gh-actions","tags":["test/v4.1.3","test/v4.1","test/v4"],"updated_at":"2021-07-02T17:07:36.607Z"}
{"owner":"technote-space","repo":"get-diff-action","sha":"022182ca8427404917213dac4eede8b5da1654e3","ref":"refs/tags/v4.2.0","tagName":"v4.2.0","branch":"gh-actions","tags":["v4.2.0","v4.2","v4"],"updated_at":"2021-07-02T17:45:57.322Z"}
2 changes: 1 addition & 1 deletion node_modules/.yarn-integrity

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

0 comments on commit 623b016

Please sign in to comment.