From 623b016c454ae55181c010cb611bd5d7028102c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Jul 2021 17:45:57 +0000 Subject: [PATCH] feat: build for release --- README.ja.md | 1 + README.md | 32 ++++++++++++++++++++++++++++++-- build.json | 2 +- node_modules/.yarn-integrity | 2 +- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/README.ja.md b/README.ja.md index 8c9384f3..54f75e3b 100644 --- a/README.ja.md +++ b/README.ja.md @@ -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)* diff --git a/README.md b/README.md index fa10308b..449b5d81 100644 --- a/README.md +++ b/README.md @@ -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)* @@ -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=` 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) diff --git a/build.json b/build.json index 2e658a4e..c548bb72 100644 --- a/build.json +++ b/build.json @@ -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"} \ No newline at end of file +{"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"} \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity index 5f569356..cdc2601a 100644 --- a/node_modules/.yarn-integrity +++ b/node_modules/.yarn-integrity @@ -1,5 +1,5 @@ { - "systemParams": "darwin-x64-88", + "systemParams": "linux-x64-83", "modulesFolders": [ "node_modules" ],