forked from mdn/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update technote-space/get-diff-action requirement to v4.0.5 (mdn#214)
* Update technote-space/get-diff-action requirement to v4.0.5 Updates the requirements on [technote-space/get-diff-action](https://github.com/technote-space/get-diff-action) to permit the latest version. - [Release notes](https://github.com/technote-space/get-diff-action/releases) - [Changelog](https://github.com/technote-space/get-diff-action/blob/master/.releasegarc) - [Commits](https://github.com/technote-space/get-diff-action/commits/c665968632c16639857c89c942d3e3369c3061f1) Signed-off-by: dependabot[bot] <[email protected]> * update for compatibility with git-diff-action@v4 * skip following steps if no diff Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: rjohnson <[email protected]>
- Loading branch information
1 parent
7c8a115
commit 1902f43
Showing
2 changed files
with
13 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,16 +26,18 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: technote-space/[email protected].2 | ||
- uses: technote-space/[email protected].5 | ||
with: | ||
PATTERNS: files/**/*.html | ||
|
||
- name: Setup Node.js environment | ||
if: env.GIT_DIFF | ||
uses: actions/[email protected] | ||
with: | ||
node-version: "12" | ||
|
||
- name: Cache node_modules | ||
if: env.GIT_DIFF | ||
uses: actions/[email protected] | ||
id: cached-node_modules | ||
with: | ||
|
@@ -44,11 +46,12 @@ jobs: | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Install all yarn packages | ||
if: steps.cached-node_modules.outputs.cache-hit != 'true' | ||
if: env.GIT_DIFF && steps.cached-node_modules.outputs.cache-hit != 'true' | ||
run: | | ||
yarn --frozen-lockfile | ||
- name: Build changed content | ||
if: env.GIT_DIFF | ||
run: | | ||
export CONTENT_ROOT=$(pwd)/files | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,37 +20,30 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: technote-space/get-diff-action@v3 | ||
- uses: technote-space/get-diff-action@v4.0.5 | ||
id: git_diff_content | ||
with: | ||
SUFFIX_FILTER: | | ||
.png | ||
.jpeg | ||
.jpg | ||
.gif | ||
.svg | ||
.webp | ||
PREFIX_FILTER: files/ | ||
PATTERNS: files/**/*.+(png|jpeg|jpg|gif|svg|webp) | ||
ABSOLUTE: true | ||
|
||
- uses: actions/checkout@v2 | ||
if: steps.git_diff_content.outputs.diff | ||
if: env.GIT_DIFF | ||
with: | ||
repository: mdn/yari | ||
path: yari | ||
|
||
- name: Setup Node.js environment | ||
if: steps.git_diff_content.outputs.diff | ||
if: env.GIT_DIFF | ||
uses: actions/[email protected] | ||
with: | ||
node-version: "12" | ||
|
||
- name: Get yarn cache directory path | ||
if: steps.git_diff_content.outputs.diff | ||
if: env.GIT_DIFF | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/[email protected] | ||
if: steps.git_diff_content.outputs.diff | ||
if: env.GIT_DIFF | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
|
@@ -59,13 +52,13 @@ jobs: | |
${{ runner.os }}-yarn- | ||
- name: Install all yarn packages | ||
if: steps.git_diff_content.outputs.diff | ||
if: env.GIT_DIFF | ||
run: | | ||
cd yari | ||
yarn --frozen-lockfile | ||
- name: Check changed files | ||
if: steps.git_diff_content.outputs.diff | ||
if: env.GIT_DIFF | ||
run: | | ||
export CONTENT_ROOT=$(pwd)/files | ||
# Need to run from the yari we've cleanly cloned. | ||
|