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

Add zizmor to CI #250

Merged
merged 2 commits into from
Dec 22, 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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- name: ruff check
uses: chartboost/ruff-action@v1
- name: ruff format
Expand Down Expand Up @@ -46,6 +47,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -104,6 +106,7 @@ jobs:
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release-builtins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ jobs:
with:
submodules: true
fetch-depth: 0
persist-credentials: false
- name: update core
env:
TAG: ${{ inputs.tag || 'master '}}
# needs to detach because we can update to a tag
run: git -C uap-core switch --detach ${{ inputs.tag || 'master' }}
run: git -C uap-core switch --detach "$TAG"
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
steps:
- name: Checkout working copy
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -34,15 +36,15 @@ jobs:
run: python -mbuild
- name: Publish to testpypi
if: ${{ env.ENVNAME == 'testpypi' }}
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1 # zizmor: ignore[use-trusted-publishing]
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
verbose: true
password: ${{ secrets.PUBLISH_TOKEN }}
- name: Publish to pypi
if: ${{ env.ENVNAME == 'pypi' }}
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1 # zizmor: ignore[use-trusted-publishing]
with:
verbose: true
password: ${{ secrets.PUBLISH_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Zizmor

on:
push:
pull_request:

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5

- name: Run zizmor
run: uvx zizmor --format sarif . > results.sarif
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
category: zizmor
Loading