CI: pre-commit autoupdate #496
Workflow file for this run
This file contains 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: "Pull Request Comment" | |
on: | |
pull_request_target: | |
types: | |
- opened | |
jobs: | |
################################################### | |
# Add comment with useful links for the reviewers | |
################################################### | |
comment: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/github-script@v7 | |
env: | |
BODY: | | |
Review docs on [Read the Docs](https://ansible-avd--${{ github.event.pull_request.number }}.org.readthedocs.build/en/${{ github.event.pull_request.number }}/) | |
To test this pull request: | |
\`\`\`sh | |
# Create virtual environment for this testing below the current directory | |
python -m venv test-avd-pr-${{ github.event.pull_request.number }} | |
# Activate the virtual environment | |
source test-avd-pr-${{ github.event.pull_request.number }}/bin/activate | |
# Install all requirements including PyAVD | |
pip install "pyavd[ansible] @ git+${{ github.event.pull_request.head.repo.clone_url }}@${{ github.event.pull_request.head.ref }}#subdirectory=python-avd" --force | |
# Point Ansible collections path to the Python virtual environment | |
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections | |
# Install Ansible collection | |
ansible-galaxy collection install git+${{ github.event.pull_request.head.repo.clone_url }}#/ansible_collections/arista/avd/,${{ github.event.pull_request.head.ref }} --force | |
# Optional: Install AVD examples | |
cd test-avd-pr-${{ github.event.pull_request.number }} | |
ansible-playbook arista.avd.install_examples | |
\`\`\` | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `${{ env.BODY }}` | |
}) |