Skip to content

PR - (#153) fix: calculate_diff_on_dicts to Support Integer Values for ARP Table ttl #278

PR - (#153) fix: calculate_diff_on_dicts to Support Integer Values for ARP Table ttl

PR - (#153) fix: calculate_diff_on_dicts to Support Integer Values for ARP Table ttl #278

Workflow file for this run

name: PR
run-name: "PR - (#${{ github.event.number }}) ${{ github.event.pull_request.title }}"
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
- ready_for_review
branches: main
permissions:
contents: read
jobs:
pyversion:
name: Discover minimum Python version
uses: ./.github/workflows/_discover_python_ver.yml
code_format:
name: Formatting and security
needs: pyversion
uses: ./.github/workflows/sub_format.yml
with:
python_version: ${{ needs.pyversion.outputs.pyversion }}
unit_tests:
name: Unit Tests
needs: pyversion
permissions:
contents: read
pull-requests: write
uses: ./.github/workflows/sub_unittest.yml
with:
python_version: ${{ needs.pyversion.outputs.pyversion }}
documentation_check:
name: API documentation
needs: pyversion
uses: ./.github/workflows/sub_docs.yml
with:
python_version: ${{ needs.pyversion.outputs.pyversion }}
docker_image_test_build:
name: Build Docker image
needs: pyversion
permissions:
contents: read
packages: write
uses: ./.github/workflows/_docker.yml
with:
publish: false
python_version: ${{ needs.pyversion.outputs.pyversion }}
store_documentation:
name: Fetch the updated documentation
needs:
- code_format
- unit_tests
- documentation_check
- docker_image_test_build
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: pack the documentation
working-directory: docs
run: tar --exclude .DS_Store --exclude sidebars.js -cvf documentation.tar *
- name: upload the documentation artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: docs/documentation.tar
pandev_pr:
name: Create a preview PR for pan.dev
needs: store_documentation
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: checkout pan.dev
uses: actions/checkout@v4
with:
repository: PaloAltoNetworks/pan.dev
token: ${{ secrets.CLSC_PAT }}
- name: download documentation artifact
uses: actions/download-artifact@v3
with:
name: documentation
path: products/panos/docs
- name: unpack the documentation
working-directory: products/panos/docs
run: |
rm -rf 'panos-upgrade-assurance'
tar xvf documentation.tar
rm -f documentation.tar
- name: create a PR to upstream pan.dev
id: pr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.CLSC_PAT }}
delete-branch: true
branch: "pua_prev_${{ github.event.pull_request.head.ref }}"
title: "[PAN-OS Upgrade Assurance][${{ github.event.pull_request.head.ref }}] documentation PREVIEW - do NOT MERGE"
commit-message: "docs: PanOS Upgrade Assurance documentation update"
labels: netsec, DO NOT MERGE
body: |
# Description
DO NOT MERGE - preview PR made for changes on branch: ${{ github.event.pull_request.head.ref }}.
# Types of changes
New feature (non-breaking change which adds functionality)
- name: find if we have a comment
uses: peter-evans/find-comment@v2
id: find
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: A Preview PR in PanDev repo has been created
repository: ${{ github.repository }}
- name: comment back on the original PR
if: steps.find.outputs.comment-id == '' && steps.pr.outputs.pull-request-url != ''
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
repository: ${{ github.repository }}
body: |
A Preview PR in PanDev repo has been created. You can view it [here](${{ steps.pr.outputs.pull-request-url }}).