Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/pr-preview-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
- uses: readthedocs/actions/preview@b8bba1484329bda1a3abe986df7ebc80a8950333 # v1.5
with:
project-slug: "python-packaging-user-guide"
18 changes: 12 additions & 6 deletions .github/workflows/test-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ jobs:

steps:
- name: Grab the repo src
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ env.I18N_BRANCH }}
persist-credentials: false

- name: List languages
id: languages
Expand All @@ -53,12 +54,13 @@ jobs:

steps:
- name: Grab the repo src
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ env.I18N_BRANCH }}
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: >-
3.10
Expand All @@ -67,15 +69,19 @@ jobs:
run: python -m pip install --upgrade nox virtualenv sphinx-lint

- name: Set Sphinx problem matcher
uses: sphinx-doc/github-problem-matcher@v1.0
uses: sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1

- name: Build translated docs in ${{ matrix.language }}
run: nox -s build -- -q -D language=${{ matrix.language }}
run: nox -s build -- -q -D language=${LANGUAGE}
env:
LANGUAGE: ${{ matrix.language }}

- name: Set Sphinx Lint problem matcher
if: always()
run: echo '::add-matcher::.github/sphinx_lint_matcher.json'

- name: Lint translation file
if: always()
run: sphinx-lint locales/${{ matrix.language }}/LC_MESSAGES/messages.po
run: sphinx-lint locales/${LANGUAGE}/LC_MESSAGES/messages.po
env:
LANGUAGE: ${{ matrix.language }}
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
- linkcheck

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: "3.11"
cache: 'pip'
Expand Down Expand Up @@ -62,6 +64,6 @@ jobs:

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
14 changes: 10 additions & 4 deletions .github/workflows/translation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'pypa'

permissions:
contents: write # to push to I18N_BRANCH

steps:
- name: Grab the repo src
uses: actions/checkout@v3
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # To reach the common commit
persist-credentials: true # For `git push`
- name: Set up git user as [bot]
# Refs:
# * https://github.community/t/github-actions-bot-email-address/17204/6
# * https://github.com/actions/checkout/issues/13#issuecomment-724415212
uses: fregante/setup-git-user@v1.1.0
uses: fregante/setup-git-user@024bc0b8e177d7e77203b48dab6fb45666854b35 # v2.0.2

- name: Switch to the translation source branch
run: |
Expand All @@ -48,10 +52,12 @@ jobs:
run: |
sh -x

git merge '${{ github.event.repository.default_branch }}'
git merge "${DEFAULT_BRANCH}"
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: >-
3.10
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-uv-build-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
- name: Update uv_build version
id: update_script
run: uv run scripts/update_uv_build_version.py
- # If there are no changes, no pull request will be created and the action exits silently.
name: Create Pull Request
uses: peter-evans/create-pull-request@v7
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update uv_build version to ${{ steps.update_script.outputs.version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ jobs:
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0

- name: Run zizmor 🌈
run: uvx zizmor --format sarif source/guides/github-actions-ci-cd-sample/* > results.sarif
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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