chore(deps): bump peter-evans/create-pull-request from 7.0.7 to 7.0.8 in the github-actions group #397
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
# This GitHub Actions workflow is named "black-formatter" and is triggered on push and pull request events. | |
# It has read permissions for repository contents. | |
# | |
# The workflow defines a single job named "black-linter" that runs on the latest Ubuntu runner. | |
# | |
# Steps: | |
# 1. Harden Runner: | |
# - Uses the "step-security/harden-runner" action (specific commit) to enhance security. | |
# - Disables sudo, blocks egress traffic, and allows specific endpoints (files.pythonhosted.org, github.com, pypi.org). | |
# | |
# 2. Checkout Code: | |
# - Uses the "actions/checkout" action (specific commit) to check out the repository code. | |
# | |
# 3. Run Black Formatter: | |
# - Uses the "psf/black" action (specific commit) to run the Black code formatter on the repository. | |
name: black-formatter | |
# Define the events that trigger this workflow | |
on: | |
push: # Trigger on push events | |
pull_request: # Trigger on pull request events | |
# Define permissions required for the workflow | |
permissions: | |
contents: read # Required to fetch repository contents | |
jobs: | |
black-linter: | |
# Specify the runner to use (ubuntu-latest) | |
runs-on: ubuntu-latest | |
steps: | |
# Step to harden the runner for security purposes | |
- name: Harden Runner | |
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
with: | |
disable-sudo: true # Disable sudo to prevent privilege escalation | |
egress-policy: block # Block all egress traffic | |
allowed-endpoints: > # Allow specific endpoints for necessary traffic | |
files.pythonhosted.org:443 | |
github.com:443 | |
pypi.org:443 | |
# Step to checkout the repository code | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
# Step to run the Black code formatter | |
- name: Run Black Formatter | |
uses: psf/black@8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b # stable |