summaryrefslogtreecommitdiffstats
path: root/uAssets/.github/workflows/update-3rd-party-assets.yml
blob: 7065811d58bdca08510e4d33b460ae3d15dff249 (plain)
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
name: Update 3rd-party assets (daily)

on:
  schedule:
    - cron: "29 4 * * *"
  workflow_dispatch:

permissions:
  contents: read

jobs:
  publish:
    if: github.repository_owner == 'uBlockOrigin'
    permissions:
      contents: write  # for Git to git push
    name: Update 3rd-party assets
    runs-on: ubuntu-latest
    steps:
      - name: Clone uAssets
        uses: actions/checkout@v3
      - name: Fetch 3rd-party assets
        run: |
          ./tools/update-3rdparties.sh
      - name: Commit changes, if any
        run: |
          if [[ -n $(git diff) ]]; then
            git config user.name "github-actions bot"
            git config user.email "<>"
            git add -u thirdparties/
            git commit -m "Update all 3rd-party assets"
            git push origin master
          fi