Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
name: Recompile Python dependencies
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
branch:
|
|
description: "Target branch to create requirements PR against"
|
|
required: true
|
|
default: "master"
|
|
type: string
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash # making this explicit opts into -e -o pipefail
|
|
|
|
jobs:
|
|
recompile-python-dependencies:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out target branch
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: "${{ inputs.branch }}"
|
|
|
|
- name: Set up Python environment
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Run make compile-requirements
|
|
env:
|
|
PACKAGE: "${{ inputs.package }}"
|
|
run: |
|
|
make compile-requirements
|
|
|
|
- name: PR preflight
|
|
run: |
|
|
if git diff --exit-code; then
|
|
# Fail early (and avoid quiet failure of create-pull-request action)
|
|
echo "Error: No changes, so not creating PR." | tee -a "$GITHUB_STEP_SUMMARY"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Make a PR
|
|
id: make-pr
|
|
uses: peter-evans/create-pull-request@v8
|
|
with:
|
|
branch: "${{ github.triggering_actor }}/compile-python-deps"
|
|
branch-suffix: short-commit-hash
|
|
add-paths: requirements
|
|
commit-message: |
|
|
feat: Recompile Python dependencies
|
|
|
|
Commit generated by workflow `${{ github.workflow_ref }}`
|
|
title: "chore: Recompile Python dependencies"
|
|
body: >-
|
|
PR generated by workflow `${{ github.workflow_ref }}`
|
|
on behalf of @${{ github.triggering_actor }}.
|
|
assignees: "${{ github.triggering_actor }}"
|
|
reviewers: "${{ github.triggering_actor }}"
|
|
|
|
- name: Job summary
|
|
env:
|
|
PR_URL: "${{ steps.make-pr.outputs.pull-request-url }}"
|
|
run: |
|
|
if [[ -z "$PR_URL" ]]; then
|
|
echo "PR not created; see log for more information" | tee -a "$GITHUB_STEP_SUMMARY"
|
|
exit 1
|
|
else
|
|
echo "PR created or updated: $PR_URL" | tee -a "$GITHUB_STEP_SUMMARY"
|
|
fi
|