Skip to content

Vendor Update

Vendor Update #202

Workflow file for this run

name: "Vendor Update"
on:
schedule:
- cron: '0 10 * * 6' # everyday at 10am
push:
branches: [main, ]
jobs:
vendor-update:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install and Setup
run: |
set -x
python -m pip install -U pip setuptools wheel
python -m pip install -U isort
python -m pip install -e .[all]
- name: Update Vendor
run: |
set -x
export PCAPKIT_VENDOR_RETRY=10
export PCAPKIT_CI_MODE=1
pcapkit-vendor
isort -l100 -ppcapkit pcapkit/const/*/*.py
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
- name: Bump Version
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
set -x
python util/bump_version.py
isort -l100 -ppcapkit --skip-glob '**/__init__.py' pcapkit
isort -l100 -ppcapkit pcapkit/const/*/*.py
isort -l100 -ppcapkit pcapkit/vendor/*/*.py
- name: Commit changes
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am"Bumped version to $(python -c 'import pcapkit; print(pcapkit.__version__)')
Updated vendor constant enumerations at $(date). The following files
have been changed: ${{ steps.verify-changed-files.outputs.changed_files }}"
- name: Push changes
uses: ad-m/github-push-action@master
if: steps.verify-changed-files.outputs.files_changed == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
# - name: Create Tag
# if: steps.verify-changed-files.outputs.files_changed == 'true'
# run: |
# version=$(python -c 'import pcapkit; print(pcapkit.__version__)')
# git tag "v$version" -m "New distribution [$version] \
# Update vendor constant enumerations at $(date). The following files have been changed: ${{ steps.verify-changed-files.outputs.changed_files }}"
# - name: Push changes
# uses: ad-m/github-push-action@master
# if: steps.verify-changed-files.outputs.files_changed == 'true'
# with:
# tags: true
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}