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

Commit 623b016

Browse files
feat: build for release
1 parent 0c45a72 commit 623b016

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

README.ja.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ env または actionsの出力 から差分を得ることができます。
3030
- [FROM, TO](#from-to)
3131
- [下書きのプルリクエストで最新コミット差分のみをチェックする場合](#%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)
3232
- [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)
33+
- [相対パスを指定](#%E7%9B%B8%E5%AF%BE%E3%83%91%E3%82%B9%E3%82%92%E6%8C%87%E5%AE%9A)
3334
- [Author](#author)
3435

3536
*generated with [TOC Generator](https://github.com/technote-space/toc-generator)*

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ You can get the differences via env or action output.
3030
- [FROM, TO](#from-to)
3131
- [Check only the latest commit differences in a draft Pull Request](#check-only-the-latest-commit-differences-in-a-draft-pull-request)
3232
- [To get the result in Json format](#to-get-the-result-in-json-format)
33+
- [Specify a relative path](#specify-a-relative-path)
3334
- [Author](#author)
3435

3536
*generated with [TOC Generator](https://github.com/technote-space/toc-generator)*
@@ -270,13 +271,40 @@ jobs:
270271
271272
Result:
272273
```shell
273-
Run echo '["yarn.lock"]' | jq .
274+
> Run echo '["yarn.lock"]' | jq .
274275
[
275276
"yarn.lock"
276277
]
277278
```
278279

279-
###
280+
### Specify a relative path
281+
282+
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`.
283+
284+
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---relativeltpathgt
285+
286+
```yaml
287+
on: pull_request
288+
name: CI
289+
jobs:
290+
dump:
291+
name: Dump
292+
runs-on: ubuntu-latest
293+
steps:
294+
- uses: actions/checkout@v2
295+
- uses: technote-space/get-diff-action@v4
296+
with:
297+
PATTERNS: '*.ts'
298+
RELATIVE: 'src/abc'
299+
- run: echo ${{ env.GIT_DIFF }}
300+
```
301+
302+
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:
303+
304+
```shell
305+
> Run echo 'test1.ts' 'test2.ts'
306+
test1.ts test2.ts
307+
```
280308

281309
## Author
282310
[GitHub (Technote)](https://github.com/technote-space)

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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"}
1+
{"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"}

node_modules/.yarn-integrity

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

0 commit comments

Comments
 (0)