Skip to content

Commit

Permalink
Sync update workflow with results-analysis setup
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip committed Feb 17, 2023
1 parent b90cb11 commit fc94fa3
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/results.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,44 @@
# This needs to stay in sync with the update_gh_pages.yml workflow in
# results-analysis, since both repos check out results-analysis and run the same
# code. This setup is to avoid having a secret access token to allow a workflow
# in one repo to push to the other repo.
name: results
on:
# Trigger every hour, or manually.
schedule:
- cron: '25 * * * *'
- cron: '15 * * * *'
workflow_dispatch:
name: results
jobs:
update:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout results-analysis
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: web-platform-tests/results-analysis
ref: main
fetch-depth: 1
path: results-analysis
- name: Setup node.js
uses: actions/setup-node@v2

- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libssl-dev libkrb5-dev
version: 1.0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci
working-directory: results-analysis

- name: Update
run: node git-write.js --max-time=3000 --max-age-days=90
working-directory: results-analysis

- name: Push new runs
run: |
git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
Expand Down

0 comments on commit fc94fa3

Please sign in to comment.