Skip to content

Commit

Permalink
Adjust to new actions/checkout v2 directory behavior
Browse files Browse the repository at this point in the history
Version 2 (beta) of the actions/checkout GitHub Action, released 3 days ago,
considers that `path` is always relative to `GITHUB_WORKSPACE`. Our steps were
expecting them to be relative to the parent folder. As such, `working-directory`
directives have become wrong and triggered failures reported in #44.

This update fixes the `working-directory` directives and also forces the
checkout of `reffy-reports` into a subfolder to avoid integrating files from
`reffy` when `git add -A` gets run.
  • Loading branch information
tidoust committed Dec 6, 2019
1 parent 06baca5 commit 9dfb075
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 27 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/update-ed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,31 @@ jobs:
steps:
- name: Checkout reffy-reports
uses: actions/checkout@master
with:
path: reffy-reports
- name: Checkout reffy
uses: actions/checkout@master
with:
repository: tidoust/reffy
ref: master
fetch-depth: 1
path: reffy
- name: Test base64 decoding
run: base64 --version
working-directory: reffy
- name: Test echo
run: echo "dG90bw=="
working-directory: reffy
- name: Test base64 decoding to a file
run: |
echo "dG90bw==" | base64 --decode > test.txt
cat test.txt
working-directory: reffy
- name: Setup node.js
uses: actions/setup-node@master
with:
node-version: 10.x
- name: Install pandoc
run: sudo apt-get install pandoc
- name: Retrieve W3C API key
env:
CONFIG_JSON: ${{ secrets.CONFIG_JSON }}
run: echo "$CONFIG_JSON" | base64 --decode > config.json
working-directory: reffy
- name: Install Reffy's dependencies
run: npm ci
- name: Setup Reffy
run: |
echo "${{ secrets.CONFIG_JSON }}" | base64 --decode > config.json
npm ci
working-directory: reffy
- name: Run Reffy's crawler
run: npm run ed
working-directory: reffy
- name: Copy reports
run: rsync -av --exclude=README.md ../reffy/reports/ ./
run: rsync -av --exclude=README.md reffy/reports/ reffy-reports/
- name: Push updates to git
run: |
git config user.name "reffy-bot"
Expand All @@ -59,3 +47,4 @@ jobs:
#npm version patch
git push origin HEAD:master
#git push origin --tags
working-directory: reffy-reports
18 changes: 10 additions & 8 deletions .github/workflows/update-tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
steps:
- name: Checkout reffy-reports
uses: actions/checkout@master
with:
path: reffy-reports
- name: Checkout reffy
uses: actions/checkout@master
with:
Expand All @@ -21,17 +23,16 @@ jobs:
node-version: 10.x
- name: Install pandoc
run: sudo apt-get install pandoc
- name: Retrieve W3C API key
run: echo "${{ secrets.CONFIG_JSON }}" | base64 --decode > config.json
working-directory: ../reffy
- name: Install Reffy's dependencies
run: npm ci
working-directory: ../reffy
- name: Setup Reffy
run: |
echo "${{ secrets.CONFIG_JSON }}" | base64 --decode > config.json
npm ci
working-directory: reffy
- name: Run Reffy's crawler
run: npm run tr
working-directory: ../reffy
working-directory: reffy
- name: Copy reports
run: rsync -av --exclude=README.md ../reffy/reports/ ./
run: rsync -av --exclude=README.md reffy/reports/ reffy-reports/
- name: Push updates to git
run: |
git config user.name "reffy-bot"
Expand All @@ -43,3 +44,4 @@ jobs:
#npm version patch
git push origin HEAD:master
#git push origin --tags
working-directory: reffy-reports

0 comments on commit 9dfb075

Please sign in to comment.