Skip to content

Update browserslist DB. #342

Update browserslist DB.

Update browserslist DB. #342

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 }}