Update ghcr.io/superioone/nut_webgui Docker tag to v0.10.1 #17548
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Fix Linting Issues in Renovate PRs | |
| # This workflow automatically fixes linting issues in Renovate PRs by running | |
| # pre-commit hooks and committing the fixes back to the PR. This prevents | |
| # CI failures due to formatting issues that can be automatically resolved. | |
| # | |
| # The workflow only runs on Renovate PRs and uses the same PAT token as the | |
| # render-helm workflow for authentication. | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| fix-linting: | |
| name: Fix Linting Issues | |
| runs-on: ubuntu-latest | |
| # Only run on Renovate PRs | |
| if: contains(github.event.pull_request.user.login, 'renovate') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.PAT }} | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Cachix | |
| uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17 | |
| with: | |
| name: claytono | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| - name: Cache pre-commit | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Run pre-commit hooks on changed files | |
| run: | | |
| # Run pre-commit hooks and capture the exit code | |
| nix develop --command pre-commit run || true | |
| - name: Check for changes | |
| id: check-changes | |
| run: | | |
| if ! git diff --quiet; then | |
| echo "changes=true" >> "$GITHUB_OUTPUT" | |
| echo "Linting fixes detected:" | |
| git diff --stat | |
| else | |
| echo "changes=false" >> "$GITHUB_OUTPUT" | |
| echo "No linting fixes needed" | |
| fi | |
| - name: Commit and push fixes | |
| if: steps.check-changes.outputs.changes == 'true' | |
| env: | |
| BRANCH_NAME: ${{ github.event.pull_request.head.ref }} | |
| run: |- | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "chore: fix linting issues | |
| Auto-fixed by pre-commit hooks: | |
| - yamlfix formatting | |
| - yamllint compliance | |
| - prettier formatting | |
| - trailing whitespace | |
| - end-of-file fixes" | |
| echo "Pushing fixes to branch: $BRANCH_NAME" | |
| git push "https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}" "HEAD:$BRANCH_NAME" |