-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #551 from gaphor/block-egress
Block egress in CI and update dependencies
- Loading branch information
Showing
4 changed files
with
303 additions
and
184 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Pre-commit updater | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# min hour dom month dow | ||
- cron: '0 5 * * 3' | ||
env: | ||
python_version: '3.13' | ||
|
||
jobs: | ||
|
||
updater: | ||
name: Update | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
disable-sudo: true | ||
egress-policy: block | ||
allowed-endpoints: > | ||
files.pythonhosted.org:443 | ||
github.com:443 | ||
objects.githubusercontent.com:443 | ||
pypi.org:443 | ||
raw.githubusercontent.com:443 | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: main | ||
- name: Set up Python | ||
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: ${{ env.python_version }} | ||
cache: pip | ||
- name: Install pre-commit | ||
run: python -m pip install pre-commit | ||
- name: Update pre-commit hooks | ||
run: pre-commit autoupdate --freeze | ||
- name: Run pre-commit hooks | ||
run: pre-commit run --all-files | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | ||
with: | ||
token: ${{ secrets.PR_CREATOR }} | ||
commit-message: Update pre-commit hooks | ||
branch: pre-commit-update | ||
delete-branch: true | ||
title: 'Update pre-commit hooks' | ||
body: | | ||
This PR was automatically created to make the following update: | ||
- Update pre-commit hooks | ||
labels: | | ||
skip-changelog |
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
Oops, something went wrong.