Skip to content

Commit

Permalink
Update technote-space/get-diff-action requirement to v4.0.5 (mdn#214)
Browse files Browse the repository at this point in the history
* 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
dependabot[bot] and escattone authored Dec 17, 2020
1 parent 7c8a115 commit 1902f43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/pr-filecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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.
Expand Down

0 comments on commit 1902f43

Please sign in to comment.