-
Notifications
You must be signed in to change notification settings - Fork 1.1k
56 lines (50 loc) · 2.26 KB
/
update-browserslist-db.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Update browserslist DB.
on:
schedule:
- cron: '0 0 1/14 * MON-FRI'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: graylog2-web-interface
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: yarn install
- name: Updating browserslist db
continue-on-error: true
run: npx browserslist@latest --update-db
- name: Create/Update Pull Request
id: pr-create
uses: peter-evans/create-pull-request@b3a2c5d525a1eb75e75c781e45a1bf3bfc23bdc6
with:
title: Updating browserslist DB.
body: This PR was created by a job that is running periodically to update the browserslist db automatically. See [here](https://github.com/browserslist/browserslist#browsers-data-updating) for details.
author: Dr. Lint-a-lot <[email protected]>
branch: update/browserslist-db
committer: Dr. Lint-a-lot <[email protected]>
commit-message: Updating browserslist DB.
delete-branch: true
- name: Get headRef and SHA of PR
id: pr-infos
if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }}
run: |
HEADREF=$(gh pr view ${{ steps.pr-create.outputs.pull-request-number }} --json headRefName --template '{{.headRefName}}')
echo "sha=$(git rev-parse origin/$HEADREF)" >> $GITHUB_OUTPUT
echo "headref=$HEADREF" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
- name: Request dispatched PR build
if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }}
run: >
gh workflow run -R Graylog2/graylog-project-internal pr-build.yml --ref master
-f caller_repo=${{ github.repository }}
-f caller_pr_nr=${{ steps.pr-create.outputs.pull-request-number }}
-f caller_base_branch=master
-f caller_head_branch=${{ steps.pr-infos.outputs.headref }}
-f head_sha=${{ steps.pr-infos.outputs.sha }}
-f initial_actor="Dr. Lint-a-lot"
env:
GITHUB_TOKEN: ${{ secrets.PAT_GRAYLOG_PROJECT_INTERNAL_WORKFLOW_RW }}