From b93459a56fc0c9ad15e8e5f0046ab2a82b9ca043 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 23 Aug 2024 15:19:16 +0800 Subject: [PATCH] ci: add browserlist update action --- .github/workflows/browserlist-update.yml | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/browserlist-update.yml diff --git a/.github/workflows/browserlist-update.yml b/.github/workflows/browserlist-update.yml new file mode 100644 index 00000000..a9f04f5f --- /dev/null +++ b/.github/workflows/browserlist-update.yml @@ -0,0 +1,35 @@ +name: Update Browserslist database + +on: + workflow_dispatch: + schedule: + - cron: '0 2 1 * *' + +permissions: + contents: write + pull-requests: write + +jobs: + update-browserslist-database: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Configure git + run: | + # Setup for commiting using built-in token. See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Update Browserslist database and create PR if applies + uses: c2corg/browserslist-update-action@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: browserslist-update + base_branch: master + directory: ./komga-webui + commit_message: 'build(webui): update Browserslist db' + title: 'Browserslist database update' + body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/) + labels: 'github_actions'