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

Pin third-party GitHub actions by commit hash and add explicit workflow permissions #93

Merged
merged 2 commits into from
Feb 28, 2025
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read

env:
FORCE_COLOR: "1"
Expand Down Expand Up @@ -71,7 +73,7 @@ jobs:
cache: pip

- name: Install uv 🌟
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@1edb52594c857e2b5b13128931090f0640537287 # v5.3.0
with:
version: ">=0.0.1"

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish-pypi-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
push:
branches:
- main
permissions:
contents: read

jobs:
build:
Expand All @@ -24,7 +26,7 @@ jobs:
uses: actions/setup-python@v5

- name: Install uv 🌟
uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
uses: astral-sh/setup-uv@1edb52594c857e2b5b13128931090f0640537287 # v5.3.0

- name: Build package for distribution 🛠️
run: |
Expand Down Expand Up @@ -54,6 +56,6 @@ jobs:
name: cladetime-package-distribution
path: dist/
- name: Publish distribution to TestPyPI 🚀
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.1.12
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
repository-url: https://test.pypi.org/legacy/
6 changes: 4 additions & 2 deletions .github/workflows/publish-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
tags:
# only run workflow for tags in release format
- "v[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: read

jobs:
build:
Expand Down Expand Up @@ -58,7 +60,7 @@ jobs:
name: cladetime-package-distribution
path: dist/
- name: Publish distribution to PyPI 🚀
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

github-release:
name: >-
Expand All @@ -79,7 +81,7 @@ jobs:
name: cladetime-package-distribution
path: dist/
- name: Sign the dists with Sigstore 📝
uses: sigstore/[email protected]
uses: sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46 # v3.0.0
with:
inputs: >-
./dist/*.tar.gz
Expand Down