pip-audit brew packages #1374
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pip-audit brew packages | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 8 * * *" | |
permissions: {} | |
jobs: | |
audit: | |
runs-on: macos-latest | |
permissions: | |
contents: read # reading repo contents | |
pages: write # writing to GitHub Pages | |
id-token: write # authentication for GitHub Pages | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
with: | |
fetch-depth: 0 | |
# credentials intentionally persisted for git operations below | |
persist-credentials: true | |
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
with: | |
python-version: "3.x" | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@main | |
with: | |
core: true | |
cask: false | |
test-bot: false | |
- name: Configure Homebrew, install dependencies | |
run: | | |
brew developer on | |
brew install osv-scanner | |
brew untap --force hashicorp/tap || true | |
- name: Configure git | |
uses: Homebrew/actions/git-user-config@main | |
with: | |
username: BrewTestBot | |
- name: Set up commit signing | |
uses: Homebrew/actions/setup-commit-signing@main | |
with: | |
signing_key: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} | |
- run: brew ruby formula2requirements.rb | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
HOMEBREW_NO_INSTALL_FROM_API: 1 | |
HOMEBREW_EVAL_ALL: 1 | |
- run: python3 pip-audit-bulk | |
- name: Setup Pages | |
if: github.repository_owner == 'Homebrew' | |
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
with: | |
path: site | |
- name: Deploy to GitHub Pages | |
if: github.repository_owner == 'Homebrew' | |
id: deployment | |
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 | |
auto-pr: | |
needs: [audit] | |
uses: ./.github/workflows/auto-pr.yml | |
secrets: | |
BREWTESTBOT_SSH_SIGNING_KEY: ${{ secrets.BREWTESTBOT_SSH_SIGNING_KEY }} | |
BREW_PIP_AUDIT_GH_TOKEN: ${{ secrets.BREW_PIP_AUDIT_GH_TOKEN }} |