22#
33# SPDX-License-Identifier: MIT
44
5- name : submodule update
5+ name : update generated files
66
77on :
88 push :
99 branches :
1010 - renovate/**
1111 - main
12- paths :
13- - .github/workflows/submodules-update.yml
14- - modules/**
12+ pull_request :
13+
14+ permissions :
15+ contents : write
1516
1617jobs :
1718 submodule-update :
1819 runs-on : ubuntu-24.04
19- permissions :
20- contents : write
21- pull-requests : write
2220
2321 steps :
2422 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -38,17 +36,25 @@ jobs:
3836 - name : Install dependencies
3937 run : uv pip install --system -e .[dev]
4038 - run : make
41- - name : Update renovate branch
42- if : github.ref != 'refs/heads/main'
39+ - run : git diff
40+
41+ - uses : pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
42+ if : github.event_name == 'pull_request' && github.actor != 'renovate[bot]'
43+ with :
44+ msg : ' chore: update generated files'
45+
46+ - name : Update current branch
47+ if : github.event_name == 'push' && github.ref_name != 'main'
4348 uses : stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
4449 with :
4550 commit_message : ' chore: Updates from submodules'
51+
4652 - name : Create Pull Request
47- if : github.ref == 'refs/heads/ main'
53+ if : github.event_name == 'push' && github.ref_name == ' main'
4854 uses : peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
4955 with :
5056 branch : create-pull-request/submodule-update
51- title : ' chore: Updates from submodules '
52- commit-message : ' chore: Updates from submodules '
53- permissions :
54- contents : read
57+ title : ' chore: update generated files '
58+ commit-message : ' chore: update generated files '
59+
60+ token : ${{ secrets.WEBLATE_CI_TOKEN }}
0 commit comments