Skip to content

Commit f3ee1e4

Browse files
committed
ci: configure rules_browsers metadata update workflow
Configure the `rules_browser-update-browsers.yml` GitHub Actions workflow to periodically run the update-tool for browser metadata and automatically create a pull request when new browser versions are detected.
1 parent a09a0b0 commit f3ee1e4

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: rules_browsers Browsers Metadata Update
2+
3+
on:
4+
schedule:
5+
# Runs at minute 0 of every 6th hour (00:00, 06:00, 12:00, 18:00 UTC)
6+
- cron: '0 */6 * * *'
7+
workflow_dispatch: # Allows you to trigger it manually.
8+
9+
permissions: {}
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
update:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
with:
21+
persist-credentials: false
22+
23+
- name: Setup Node and pnpm
24+
uses: ./github-actions/npm/checkout-and-setup-node
25+
26+
- uses: ./github-actions/bazel/setup
27+
- uses: ./github-actions/bazel/configure-remote
28+
with:
29+
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
30+
31+
- name: Install root dependencies (for buildifier & prettier)
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Install rules_browsers dependencies
35+
run: pnpm install --frozen-lockfile
36+
working-directory: bazel/rules/rules_browsers
37+
38+
- name: Run update-tool
39+
run: pnpm bazel run //browsers/private/update-tool
40+
working-directory: bazel/rules/rules_browsers
41+
42+
- name: Create Pull Request
43+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
44+
with:
45+
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
46+
push-to-fork: 'angular-robot/dev-infra'
47+
delete-branch: true
48+
maintainer-can-modify: true
49+
branch: rules-browsers-update
50+
committer: Angular Robot <angular-robot@google.com>
51+
author: Angular Robot <angular-robot@google.com>
52+
title: 'build: update rules_browsers metadata'
53+
commit-message: 'build: update rules_browsers browsers metadata to latest versions'
54+
body: |
55+
Automatically updated rules_browsers browsers metadata.
56+
labels: |
57+
action: merge

0 commit comments

Comments
 (0)