Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra] Integrate with external PR preview system #19838

Merged
merged 7 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/detect_pull_request_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: pr-preview-detect
on: deployment
jobs:
detect-deployment:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
# By default, the "checkout" Action will attempt to check out the
foolip marked this conversation as resolved.
Show resolved Hide resolved
# revision to be deployed. Because it does not fetch GitHub Pull Request
# branches, this will fail.
with:
ref: refs/heads/master
- name: Install dependency
run: pip install requests
- name: Detect deployment
run:
./tools/ci/pr_preview.py
--host https://api.github.com
--github-project web-platform-tests/wpt
detect
--target https://wptpr.live
--timeout 600
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/pull_request_previews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pr-preview-sync
on:
schedule:
- cron: */5 * * * *
jobs:
update-pr-preview:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
jugglinmike marked this conversation as resolved.
Show resolved Hide resolved
with:
fetch-depth: 1
- name: Install dependency
run: pip install requests
- name: Synchronize state
run:
./tools/ci/pr_preview.py
--host https://api.github.com
--github-project web-platform-tests/wpt
synchronize
--window 480
env:
# This Workflow must trigger further workflows. The GitHub-provided
# `GITHUB_TOKEN` secret is incapable of doing this [1], so a
# user-generated token must be specified instead. This token requires
# the "repo" scope, and is should be stored as a Secret named
foolip marked this conversation as resolved.
Show resolved Hide resolved
# "DEPLOY_TOKEN" in this GitHub project.
#
# [1] https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
Loading