mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-13 05:21:34 -05:00
Tidy modules on renovate branches
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
7c13302936
commit
a6b0edfcaa
22
.github/workflows/test-tidy.yml
vendored
22
.github/workflows/test-tidy.yml
vendored
@ -40,6 +40,28 @@ jobs:
|
|||||||
echo "submods=${mods}" >> $GITHUB_OUTPUT
|
echo "submods=${mods}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Go tidy check
|
- name: Go tidy check
|
||||||
|
id: tidycheck
|
||||||
uses: katexochen/go-tidy-check@45731e0013a976d5d616d79007c7ba52de6ce542 # tag=v1.0.2
|
uses: katexochen/go-tidy-check@45731e0013a976d5d616d79007c7ba52de6ce542 # tag=v1.0.2
|
||||||
with:
|
with:
|
||||||
modules: ${{ steps.submods.outputs.submods }}
|
modules: ${{ steps.submods.outputs.submods }}
|
||||||
|
|
||||||
|
# The following steps are only executed if the previous tidy check failed
|
||||||
|
# and the action runs on an renovat branche. In this case, we tidy all
|
||||||
|
# modules again and commit the changes, so the user doesn't need to do it.
|
||||||
|
|
||||||
|
- name: Tidy modules on renovate branches
|
||||||
|
if: ${{ failure() && (steps.tidycheck.conclusion == 'failure') && startsWith(github.head_ref, 'renovate/') }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
for mod in ${{ steps.submods.outputs.submods }}; do
|
||||||
|
(cd $mod; go mod tidy)
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: Push changes
|
||||||
|
if: ${{ failure() && (steps.tidycheck.conclusion == 'failure') && startsWith(github.head_ref, 'renovate/') }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git config --global user.name "${{ github.actor }}"
|
||||||
|
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
||||||
|
git commit -am "[bot] Tidy all modules"
|
||||||
|
git push
|
||||||
|
Loading…
x
Reference in New Issue
Block a user