Skip to content

Commit

Permalink
tools: update wpt.fyi used daily checkout ref
Browse files Browse the repository at this point in the history
PR-URL: #46730
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
panva authored and targos committed Mar 13, 2023
1 parent 1f38657 commit 617b5b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/daily-wpt-fyi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,18 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]')
echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA | jq -r '.sha')" >> $GITHUB_ENV
echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA --jq '.sha')" >> $GITHUB_ENV
- name: Checkout ${{ steps.setup-node.outputs.node-version }}
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }}
- name: Set env.NODE
run: echo "NODE=$(which node)" >> $GITHUB_ENV
- name: Set env.WPT_DAILY_REF
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "WPT_DAILY_REF=$(gh api /repos/web-platform-tests/wpt/branches/epochs/daily --jq '.commit.sha')" >> $GITHUB_ENV

# replace checked out WPT with the synchronized branch
- name: Remove stale WPT
Expand All @@ -74,7 +78,7 @@ jobs:
persist-credentials: false
path: test/fixtures/wpt
clean: false
ref: epochs/daily
ref: ${{ env.WPT_DAILY_REF }}
- name: Set env.WPT_REVISION
run: echo "WPT_REVISION=$(git rev-parse HEAD)" >> $GITHUB_ENV
working-directory: test/fixtures/wpt
Expand Down

0 comments on commit 617b5b1

Please sign in to comment.