Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pre-commit CI updates #557

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ permissions:

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
Expand All @@ -39,8 +39,8 @@ jobs:
pypi.org:443
github.com:443
api.github.com:443
objects.githubusercontent.com:443
raw.githubusercontent.com:443
*.githubusercontent.com:443
ghcr.io

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -61,7 +61,7 @@ jobs:

build:
needs: lint
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: write
strategy:
Expand All @@ -85,9 +85,9 @@ jobs:
files.pythonhosted.org:443
pypi.org:443
github.com:443
*.githubusercontent.com:443
ghcr.io
keys.openpgp.org:443
objects.githubusercontent.com:443
raw.githubusercontent.com:443
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
publish-to-pypi:
name: Publish to PyPI (release only)
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
id-token: write
if: ${{ github.event_name == 'release' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:

jobs:
dependency-review:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
pr-labeler:
permissions:
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Harden Runner
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/pre-commit-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

updater:
name: Update
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand All @@ -20,10 +20,11 @@ jobs:
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
objects.githubusercontent.com:443
pypi.org:443
raw.githubusercontent.com:443
github.com:443
api.github.com:443
*.githubusercontent.com:443
ghcr.io
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: main
Expand All @@ -38,10 +39,16 @@ jobs:
run: pre-commit autoupdate --freeze
- name: Run pre-commit hooks
run: pre-commit run --all-files
- name: Create GitHub App Token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: generate-token
with:
app-id: ${{ secrets.GAPHOR_UPDATER_APP_ID }}
private-key: ${{ secrets.GAPHOR_UPDATER_APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.PR_CREATOR }}
token: ${{ steps.generate-token.outputs.token }}
commit-message: Update pre-commit hooks
branch: pre-commit-update
delete-branch: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
permissions:
contents: write # for release-drafter/release-drafter to create a github release
pull-requests: write # for release-drafter/release-drafter to add label to PR
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
Expand Down