Skip to content

feat: verify commit-check artifact attestations #53

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

Merged
merged 10 commits into from
Apr 3, 2025
16 changes: 15 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,23 @@ runs:
# https://github.com/pypa/setuptools/issues/3269
export DEB_PYTHON_INSTALL_LAYOUT=deb
fi

# Set up virtual environment
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r "$GITHUB_ACTION_PATH/requirements.txt"

# Download artifact
python3 -m pip download -r "$GITHUB_ACTION_PATH/requirements.txt"

# Verify artifact attestations
if ! gh attestation verify commit_check-*.whl -R commit-check/commit-check; then
echo "Artifact verification failed. Aborting installation."
exit 1
fi

# Install artifact
python3 -m pip install commit_check-*.whl PyGithub-*.whl

python3 "$GITHUB_ACTION_PATH/main.py"
env:
MESSAGE: ${{ inputs.message }}
Expand Down