Update dependency pre-commit to v4 #36
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_target | |
on: | |
pull_request_target: | |
workflow_call: | |
jobs: | |
info: | |
name: Output useful information | |
runs-on: ubuntu-latest | |
outputs: | |
has-release-drafter-config: ${{ steps.inspect-files.outputs.has-release-drafter-config }} | |
steps: | |
- name: ⤵️ Check out code from GitHub | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: .github | |
- name: ℹ️ Inspect files | |
id: inspect-files | |
run: | | |
if [[ -f .github/release-drafter.yml ]]; then | |
echo "has-release-drafter-config=true" >> "${GITHUB_OUTPUT}"; | |
else | |
echo "has-release-drafter-config=false" >> "${GITHUB_OUTPUT}"; | |
fi | |
assign-author-to-pr: | |
name: Assign Author to PR | |
if: ${{ !endswith(github.actor, '[bot]') && (github.event.action == 'opened' || github.event.action == 'reopened') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: technote-space/assign-author@v1 # cspell:ignore technote | |
enforce-branch-name: | |
name: Enforce Branch Name | |
runs-on: ubuntu-latest | |
steps: | |
- name: 💂 Enforce Branch Name | |
uses: finleyfamily/action-enforce-branch-name@v1.0.1 | |
with: | |
allowed_prefixes: >- | |
bugfix,chore,dependabot,deps,docs,feat,feature,fix,hotfix, | |
maint,maintain,maintenance,release,renovate,snyk | |
label-pr: | |
name: ✏️ Label PR | |
if: | | |
needs.info.outputs.has-release-drafter-config == 'true' && | |
( | |
github.event.action == 'opened' || | |
github.event.action == 'reopened' || | |
github.event.action == 'synchronize' | |
) | |
needs: info | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚀 Run Release Drafter | |
uses: release-drafter/release-drafter@v6 | |
with: | |
disable-releaser: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |