Update dependency netdata/netdata to v2.10.3 #17527
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: Manage Ansible Galaxy Roles and Collections | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| manage-roles: | |
| name: Manage Ansible Galaxy Roles and Collections | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ github.token }} | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.ref || github.ref }} | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Remove existing galaxy roles and collections | |
| run: | | |
| rm -rf ansible/galaxy | |
| - name: Install galaxy roles and collections | |
| run: | | |
| cd ansible | |
| nix develop --command ansible-galaxy install -r requirements.yml | |
| - name: Check for changes | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| if ! git diff --quiet; then | |
| echo "Galaxy roles need to be updated on main branch!" | |
| git diff --stat | |
| exit 1 | |
| fi | |
| - name: Commit updated roles | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| if ! git diff --exit-code --cached; then | |
| git commit -m "Update Ansible Galaxy roles and collections" | |
| fi | |
| - name: Push changes via PAT | |
| if: github.event_name == 'pull_request' | |
| run: |- | |
| BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}" | |
| echo "Pushing to branch: $BRANCH_NAME" | |
| git push "https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}" "HEAD:${BRANCH_NAME}" |