Skip to content

Commit bfdecb1

Browse files
authored
Lingering CI/CD pins, add cooldowns, remove template injections (psf#4906)
Signed-off-by: William Woodruff <[email protected]>
1 parent 7916e4a commit bfdecb1

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ updates:
88
schedule:
99
interval: "weekly"
1010
labels: ["skip news", "C: dependencies"]
11+
cooldown:
12+
default-days: 7
1113

1214
- package-ecosystem: "pip"
1315
directory: "docs/"
1416
schedule:
1517
interval: "weekly"
1618
labels: ["skip news", "C: dependencies", "T: documentation"]
19+
cooldown:
20+
default-days: 7

.github/workflows/docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,6 @@ jobs:
6868
tags: pyfound/black:latest_prerelease
6969

7070
- name: Image digest
71-
run: echo ${{ steps.docker_build.outputs.digest }}
71+
run: echo ${STEPS_DOCKER_BUILD_OUTPUTS_DIGEST}
72+
env:
73+
STEPS_DOCKER_BUILD_OUTPUTS_DIGEST: ${{ steps.docker_build.outputs.digest }}

.github/workflows/pypi_upload.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ on:
88
branches:
99
- main
1010

11-
permissions:
12-
contents: read
13-
id-token: write # Required for PyPI trusted publishing
11+
permissions: {}
1412

1513
jobs:
1614
main:
@@ -21,6 +19,9 @@ jobs:
2119
name: release
2220
url: https://pypi.org/p/black
2321

22+
permissions:
23+
id-token: write # Required for PyPI trusted publishing
24+
2425
steps:
2526
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2627
with:
@@ -42,7 +43,7 @@ jobs:
4243

4344
- if: github.event_name == 'release'
4445
name: Publish package distributions to PyPI
45-
uses: pypa/gh-action-pypi-publish@release/v1
46+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
4647
with:
4748
verbose: true
4849

@@ -99,6 +100,8 @@ jobs:
99100
environment:
100101
name: release
101102
url: https://pypi.org/p/black
103+
permissions:
104+
id-token: write # Required for PyPI trusted publishing
102105
strategy:
103106
fail-fast: false
104107
matrix:
@@ -121,7 +124,7 @@ jobs:
121124

122125
- if: github.event_name == 'release'
123126
name: Publish package distributions to PyPI
124-
uses: pypa/gh-action-pypi-publish@release/v1
127+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
125128
with:
126129
packages-dir: wheelhouse/
127130
verbose: true
@@ -145,5 +148,7 @@ jobs:
145148
- if: github.event_name == 'release'
146149
name: Update stable branch to release tag & push
147150
run: |
148-
git reset --hard ${{ github.event.release.tag_name }}
151+
git reset --hard "${TAG_NAME}"
149152
git push
153+
env:
154+
TAG_NAME: ${{ github.event.release.tag_name }}

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ runs:
6464
# Display the raw output in the step
6565
echo "${out}"
6666
67-
if [ "${{ inputs.summary }}" == "true" ]; then
67+
if [ "${INPUT_SUMMARY}" == "true" ]; then
6868
# Display the Markdown output in the job summary
6969
echo "\`\`\`python" >> $GITHUB_STEP_SUMMARY
7070
echo "${out}" >> $GITHUB_STEP_SUMMARY
@@ -81,6 +81,7 @@ runs:
8181
INPUT_BLACK_ARGS: ${{ inputs.black_args }}
8282
INPUT_VERSION: ${{ inputs.version }}
8383
INPUT_USE_PYPROJECT: ${{ inputs.use_pyproject }}
84+
INPUT_SUMMARY: ${{ inputs.summary }}
8485
OUTPUT_FILE: ${{ inputs.output-file }}
8586
pythonioencoding: utf-8
8687
shell: bash

0 commit comments

Comments
 (0)