Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 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
101 changes: 85 additions & 16 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: recursive
persist-credentials: false

- uses: prefix-dev/setup-pixi@main
with:
Expand All @@ -65,12 +66,15 @@ jobs:
# fetch everything so we can checkout the tag
fetch-depth: 0
submodules: recursive
persist-credentials: false

# check out tag if workflow_dispatch
- name: Checkout tag
if: github.event_name == 'workflow_dispatch'
run: |
git checkout tags/${{ github.event.inputs.tag }}
git checkout tags/${GITHUB_EVENT_INPUTS_TAG}
env:
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}

- uses: prefix-dev/setup-pixi@main
with:
Expand All @@ -87,7 +91,9 @@ jobs:

- name: Tag from workflow_dispatch
if: github.event_name == 'workflow_dispatch'
run: echo "RELEASE_VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=${GITHUB_EVENT_INPUTS_TAG}" >> $GITHUB_ENV
env:
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}

- name: Deploy with mike 🚀
run: |
Expand All @@ -106,6 +112,7 @@ jobs:
# fetch everything so we can checkout the tag
fetch-depth: 0
submodules: recursive
persist-credentials: false

- uses: prefix-dev/setup-pixi@main
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/enforce-sha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
persist-credentials: false
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@9e9574ef04ea69da568d6249bd69539ccc704e74 # v4
with:
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: recursive
persist-credentials: false
# Turn back on when we're on the released version of dist
# - name: Install dist
# # we specify bash to get pipefail; it guards against the `curl` command
Expand Down Expand Up @@ -146,6 +147,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: recursive
persist-credentials: false

# Use fork of dist to allow for binaries in the root of the tarball
- name: Install cargo-dist from git
Expand Down Expand Up @@ -189,8 +191,11 @@ jobs:
fi

# Actually do builds and make zips and whatnot
dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
dist build ${NEEDS_PLAN_OUTPUTS_TAG_FLAG} --print=linkage --output-format=json ${MATRIX_DIST_ARGS} > dist-manifest.json
echo "dist ran successfully"
env:
NEEDS_PLAN_OUTPUTS_TAG_FLAG: ${{ needs.plan.outputs.tag-flag }}
MATRIX_DIST_ARGS: ${{ matrix.dist_args }}
- name: Attest Builds
id: attest
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
Expand Down Expand Up @@ -232,6 +237,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: recursive
persist-credentials: false
- name: Install cached dist
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
Expand All @@ -248,7 +254,7 @@ jobs:
- id: cargo-dist
shell: bash
run: |
dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
dist build ${NEEDS_PLAN_OUTPUTS_TAG_FLAG} --output-format=json "--artifacts=global" > dist-manifest.json
echo "dist ran successfully"

# Parse out what we just built and upload it to scratch storage
Expand All @@ -257,6 +263,8 @@ jobs:
echo "EOF" >> "$GITHUB_OUTPUT"

cp dist-manifest.json "$BUILD_MANIFEST_NAME"
env:
NEEDS_PLAN_OUTPUTS_TAG_FLAG: ${{ needs.plan.outputs.tag-flag }}
- name: "Upload artifacts"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
Expand All @@ -281,6 +289,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: recursive
persist-credentials: false
- name: Install cached dist
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
Expand All @@ -298,10 +307,12 @@ jobs:
- id: host
shell: bash
run: |
dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
dist host ${NEEDS_PLAN_OUTPUTS_TAG_FLAG} --steps=upload --steps=release --output-format=json > dist-manifest.json
echo "artifacts uploaded and released successfully"
cat dist-manifest.json
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
env:
NEEDS_PLAN_OUTPUTS_TAG_FLAG: ${{ needs.plan.outputs.tag-flag }}
- name: "Upload dist-manifest.json"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
Expand Down Expand Up @@ -402,6 +413,7 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
submodules: recursive
persist-credentials: false
# Create a GitHub Release while uploading all files to it
- name: "Download GitHub Artifacts"
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
Expand All @@ -419,8 +431,9 @@ jobs:
ANNOUNCEMENT_TITLE: "${{ fromJson(needs.host.outputs.val).announcement_title }}"
ANNOUNCEMENT_BODY: "${{ fromJson(needs.host.outputs.val).announcement_github_body }}"
RELEASE_COMMIT: "${{ github.sha }}"
NEEDS_PLAN_OUTPUTS_TAG: ${{ needs.plan.outputs.tag }}
run: |
# Write and read notes from a file to avoid quoting breaking things
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt

gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --draft --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
gh release create "${NEEDS_PLAN_OUTPUTS_TAG}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --draft --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
2 changes: 2 additions & 0 deletions .github/workflows/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
persist-credentials: false
- uses: prefix-dev/setup-pixi@main
with:
cache: true
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_common_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
ref: ${{ inputs.sha }}
persist-credentials: false
- name: Create Dev Drive using ReFS
if: ${{ contains(inputs.arch, 'windows') }}
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
Expand All @@ -55,7 +56,7 @@ jobs:
if: ${{ !contains(inputs.arch, 'windows') && always() }}
shell: bash
run: |
cat ${{ env.SUMMARY_FILE }} >> $GITHUB_STEP_SUMMARY
cat ${SUMMARY_FILE} >> $GITHUB_STEP_SUMMARY
- name: Write .summary.md to GitHub Summary (Windows)
if: ${{ contains(inputs.arch, 'windows') && always() }}
shell: pwsh
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/trampoline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0 # Fetch full history so we have branch information
persist-credentials: false

- name: Set up Rust
uses: taiki-e/setup-cross-toolchain-action@84e58a47fc2bcd3821a2aa8c153595bbffb0e10f # v1
Expand Down Expand Up @@ -88,6 +89,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
persist-credentials: false

- name: Download all binaries
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: GitHub Actions Security Analysis with zizmor 🌈

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]

permissions: {}

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
3 changes: 3 additions & 0 deletions lefthook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ pre-commit:
- name: typos
stage_fixed: true
run: pixi {run} typos
- name: zizmor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, maybe we can use it at pre-push level?

glob: ".github/*.{yaml,yml}"
run: pixi {run} zizmor {staged_files}

pre-push:
jobs:
Expand Down
73 changes: 73 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ ruff = ">=0.14.0,<0.15"
shellcheck = ">=0.10.0,<0.11"
taplo = ">=0.10.0,<0.11"
typos = ">=1.38.1,<2"
zizmor = ">=1.14.1,<2"

[feature.lint.tasks]
actionlint = { cmd = "actionlint", env = { SHELLCHECK_OPTS = "-e SC2086" } }
Expand Down
5 changes: 5 additions & 0 deletions zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rules:
unpinned-uses:
config:
policies:
prefix-dev/*: any
Loading