Skip to content

Commit 6ada1eb

Browse files
committed
style: format .yml more uniformly
1 parent dd5f892 commit 6ada1eb

File tree

2 files changed

+92
-92
lines changed

2 files changed

+92
-92
lines changed

.github/workflows/codeql-analysis.yml

+27-27
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,36 @@ jobs:
4444
# Learn more about CodeQL language support at https://git.io/codeql-language-support
4545

4646
steps:
47-
- name: Checkout repository
48-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49-
with:
50-
persist-credentials: false
47+
- name: Checkout repository
48+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
with:
50+
persist-credentials: false
5151

52-
# Initializes the CodeQL tools for scanning.
53-
- name: Initialize CodeQL
54-
uses: github/codeql-action/init@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3
55-
with:
56-
languages: ${{ matrix.language }}
57-
# If you wish to specify custom queries, you can do so here or in a config file.
58-
# By default, queries listed here will override any specified in a config file.
59-
# Prefix the list here with "+" to use these queries and those in the config file.
60-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
# Initializes the CodeQL tools for scanning.
53+
- name: Initialize CodeQL
54+
uses: github/codeql-action/init@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3
55+
with:
56+
languages: ${{ matrix.language }}
57+
# If you wish to specify custom queries, you can do so here or in a config file.
58+
# By default, queries listed here will override any specified in a config file.
59+
# Prefix the list here with "+" to use these queries and those in the config file.
60+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
6161

62-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
63-
# If this step fails, then you should remove it and run the build manually (see below)
64-
- name: Autobuild
65-
uses: github/codeql-action/autobuild@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3
62+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
63+
# If this step fails, then you should remove it and run the build manually (see below)
64+
- name: Autobuild
65+
uses: github/codeql-action/autobuild@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3
6666

67-
# ℹ️ Command-line programs to run using the OS shell.
68-
# 📚 https://git.io/JvXDl
67+
# ℹ️ Command-line programs to run using the OS shell.
68+
# 📚 https://git.io/JvXDl
6969

70-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
71-
# and modify them (or add more) to build your code if your project
72-
# uses a compiled language
70+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
71+
# and modify them (or add more) to build your code if your project
72+
# uses a compiled language
7373

74-
#- run: |
75-
# make bootstrap
76-
# make release
74+
#- run: |
75+
# make bootstrap
76+
# make release
7777

78-
- name: Perform CodeQL Analysis
79-
uses: github/codeql-action/analyze@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3
78+
- name: Perform CodeQL Analysis
79+
uses: github/codeql-action/analyze@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3

.github/workflows/publish.yml

+65-65
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ jobs:
3434
run-id: ${{ steps.run-id.outputs.run-id }}
3535

3636
steps:
37-
- name: "Find latest kit.yml run"
38-
id: runs
39-
uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d # v2.4.0
40-
with:
41-
route: GET /repos/nedbat/coveragepy/actions/workflows/kit.yml/runs
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
45-
- name: "Record run id" # zizmor: ignore[template-injection]
46-
id: run-id
47-
run: |
48-
# There must be a shorter way to write this...
49-
[ "${{ fromJson(steps.runs.outputs.data).workflow_runs[0].status}}" = "completed" ] || exit 1
50-
[ "${{ fromJson(steps.runs.outputs.data).workflow_runs[0].conclusion}}" = "success" ] || exit 1
51-
echo "run-id=${{ fromJson(steps.runs.outputs.data).workflow_runs[0].id }}" >> "$GITHUB_OUTPUT"
37+
- name: "Find latest kit.yml run"
38+
id: runs
39+
uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d # v2.4.0
40+
with:
41+
route: GET /repos/nedbat/coveragepy/actions/workflows/kit.yml/runs
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: "Record run id" # zizmor: ignore[template-injection]
46+
id: run-id
47+
run: |
48+
# There must be a shorter way to write this...
49+
[ "${{ fromJson(steps.runs.outputs.data).workflow_runs[0].status}}" = "completed" ] || exit 1
50+
[ "${{ fromJson(steps.runs.outputs.data).workflow_runs[0].conclusion}}" = "success" ] || exit 1
51+
echo "run-id=${{ fromJson(steps.runs.outputs.data).workflow_runs[0].id }}" >> "$GITHUB_OUTPUT"
5252
5353
publish-to-test-pypi:
5454
name: "Publish to Test PyPI"
@@ -63,32 +63,32 @@ jobs:
6363
- find-run
6464

6565
steps:
66-
- name: "Download dists"
67-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
68-
with:
69-
repository: "nedbat/coveragepy"
70-
run-id: ${{ needs.find-run.outputs.run-id }}
71-
github-token: ${{ secrets.GITHUB_TOKEN }}
72-
pattern: "dist-*"
73-
merge-multiple: true
74-
path: "dist/"
75-
76-
- name: "What did we get?"
77-
run: |
78-
ls -alR
79-
echo "Number of dists, should be $EXPECTED:"
80-
ls -1 dist | wc -l
81-
files=$(ls dist 2>/dev/null | wc -l) && [ "$files" -eq $EXPECTED ] || exit 1
82-
83-
- name: "Generate attestations"
84-
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
85-
with:
86-
subject-path: "dist/*"
87-
88-
- name: "Publish dists to Test PyPI"
89-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
90-
with:
91-
repository-url: https://test.pypi.org/legacy/
66+
- name: "Download dists"
67+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
68+
with:
69+
repository: "nedbat/coveragepy"
70+
run-id: ${{ needs.find-run.outputs.run-id }}
71+
github-token: ${{ secrets.GITHUB_TOKEN }}
72+
pattern: "dist-*"
73+
merge-multiple: true
74+
path: "dist/"
75+
76+
- name: "What did we get?"
77+
run: |
78+
ls -alR
79+
echo "Number of dists, should be $EXPECTED:"
80+
ls -1 dist | wc -l
81+
files=$(ls dist 2>/dev/null | wc -l) && [ "$files" -eq $EXPECTED ] || exit 1
82+
83+
- name: "Generate attestations"
84+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
85+
with:
86+
subject-path: "dist/*"
87+
88+
- name: "Publish dists to Test PyPI"
89+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
90+
with:
91+
repository-url: https://test.pypi.org/legacy/
9292

9393
publish-to-pypi:
9494
name: "Publish to PyPI"
@@ -103,27 +103,27 @@ jobs:
103103
- find-run
104104

105105
steps:
106-
- name: "Download dists"
107-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
108-
with:
109-
repository: "nedbat/coveragepy"
110-
run-id: ${{ needs.find-run.outputs.run-id }}
111-
github-token: ${{ secrets.GITHUB_TOKEN }}
112-
pattern: "dist-*"
113-
merge-multiple: true
114-
path: "dist/"
115-
116-
- name: "What did we get?"
117-
run: |
118-
ls -alR
119-
echo "Number of dists, should be $EXPECTED:"
120-
ls -1 dist | wc -l
121-
files=$(ls dist 2>/dev/null | wc -l) && [ "$files" -eq $EXPECTED ] || exit 1
122-
123-
- name: "Generate attestations"
124-
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
125-
with:
126-
subject-path: "dist/*"
127-
128-
- name: "Publish dists to PyPI"
129-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
106+
- name: "Download dists"
107+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
108+
with:
109+
repository: "nedbat/coveragepy"
110+
run-id: ${{ needs.find-run.outputs.run-id }}
111+
github-token: ${{ secrets.GITHUB_TOKEN }}
112+
pattern: "dist-*"
113+
merge-multiple: true
114+
path: "dist/"
115+
116+
- name: "What did we get?"
117+
run: |
118+
ls -alR
119+
echo "Number of dists, should be $EXPECTED:"
120+
ls -1 dist | wc -l
121+
files=$(ls dist 2>/dev/null | wc -l) && [ "$files" -eq $EXPECTED ] || exit 1
122+
123+
- name: "Generate attestations"
124+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
125+
with:
126+
subject-path: "dist/*"
127+
128+
- name: "Publish dists to PyPI"
129+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

0 commit comments

Comments
 (0)