fix: urgent patch on python sshnpd #13
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: Bump requirements.txt | |
on: | |
pull_request: | |
paths: | |
- 'packages/python/sshnpd/pyproject.toml' | |
- 'examples/automations/python/sshnoports_automation_python/pyproject.toml' | |
workflow_dispatch: | |
permissions: | |
pull-requests: write | |
jobs: | |
bump_requirements: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout this repo | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
token: ${{ secrets.MY_GITHUB_TOKEN }} | |
- name: Set up Python | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: '3.11' | |
- name: Install Poetry | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 # v3.0.0 | |
with: | |
poetry-version: '1.8.2' | |
- name: Bump sshnpd Python dependencies | |
working-directory: packages/python/sshnpd | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
run: | | |
poetry update | |
poetry export --format requirements.txt --output requirements.txt | |
git config --global user.name 'dependabot[bot]' | |
git config --global user.email 'dependabot[bot]@users.noreply.github.com' | |
git add requirements.txt | |
if [ -z "$(git status --porcelain)" ]; then | |
echo 'No changes to commit on this run' | |
exit 0 | |
else | |
git commit -m "build(deps): Bump sshnpd requirements.txt" | |
git push | |
fi | |
- name: Bump sshnoports_automation_python Python dependencies | |
working-directory: examples/automations/python | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
run: | | |
poetry update | |
poetry export --format requirements.txt --output requirements.txt | |
git config --global user.name 'dependabot[bot]' | |
git config --global user.email 'dependabot[bot]@users.noreply.github.com' | |
git add requirements.txt | |
if [ -z "$(git status --porcelain)" ]; then | |
echo 'No changes to commit on this run' | |
exit 0 | |
else | |
git commit -m "build(deps): Bump sshnoports_sdk requirements.txt" | |
git push | |
fi |