Skip to content
This repository was archived by the owner on May 7, 2026. It is now read-only.

Commit 20a6abe

Browse files
committed
chore(ci): Update and Pin GH Actions
Signed-off-by: Paul Horton <phorton@sonatype.com>
1 parent b5b080b commit 20a6abe

2 files changed

Lines changed: 42 additions & 46 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,22 @@ jobs:
3838
runs-on: ubuntu-20.04
3939
steps:
4040
- name: Checkout
41-
# see https://github.com/actions/checkout
42-
uses: actions/checkout@v2
43-
- name: Setup Python Environment
44-
# see https://github.com/actions/setup-python
45-
uses: actions/setup-python@v2
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4645
with:
4746
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
4847
architecture: 'x64'
48+
4949
- name: Install poetry
50-
# see https://github.com/marketplace/actions/setup-poetry
51-
uses: Gr1N/setup-poetry@v7
50+
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
5251
with:
5352
poetry-version: ${{ env.POETRY_VERSION }}
53+
5454
- name: Install dependencies
5555
run: poetry install --no-root
56+
5657
- name: Run tox
5758
run: poetry run tox -e flake8
5859

@@ -71,21 +72,22 @@ jobs:
7172
toxenv-factor: 'lowest'
7273
steps:
7374
- name: Checkout
74-
# see https://github.com/actions/checkout
75-
uses: actions/checkout@v2
76-
- name: Setup Python Environment
77-
# see https://github.com/actions/setup-python
78-
uses: actions/setup-python@v2
75+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
76+
77+
- name: Set up Python
78+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
7979
with:
80-
python-version: ${{ matrix.python-version }}
80+
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
8181
architecture: 'x64'
82+
8283
- name: Install poetry
83-
# see https://github.com/marketplace/actions/setup-poetry
84-
uses: Gr1N/setup-poetry@v7
84+
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
8585
with:
8686
poetry-version: ${{ env.POETRY_VERSION }}
87+
8788
- name: Install dependencies
8889
run: poetry install --no-root
90+
8991
- name: Run tox
9092
run: poetry run tox -e mypy-${{ matrix.toxenv-factor }}
9193

@@ -116,39 +118,42 @@ jobs:
116118
run: |
117119
git config --global core.autocrlf false
118120
git config --global core.eol lf
121+
119122
- name: Checkout
120-
# see https://github.com/actions/checkout
121-
uses: actions/checkout@v2
123+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
124+
122125
- name: Create reports directory
123126
run: mkdir ${{ env.REPORTS_DIR }}
124-
- name: Setup Python Environment
125-
# see https://github.com/actions/setup-python
126-
uses: actions/setup-python@v2
127+
128+
- name: Set up Python
129+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
127130
with:
128-
python-version: ${{ matrix.python-version }}
131+
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
129132
architecture: 'x64'
130-
- name: Validate Python Environment
131-
run: echo "import sys; print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))" | python
133+
132134
- name: Install poetry
133-
# see https://github.com/marketplace/actions/setup-poetry
134-
uses: Gr1N/setup-poetry@v7
135+
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
135136
with:
136137
poetry-version: ${{ env.POETRY_VERSION }}
138+
137139
- name: Install dependencies
138140
run: poetry install --no-root
141+
139142
- name: Ensure build successful
140143
run: poetry build
144+
141145
- name: Run tox
142146
run: poetry run tox -e py-${{ matrix.toxenv-factor }} -s false
147+
143148
- name: Generate coverage reports
144149
run: >
145150
poetry run coverage report &&
146151
poetry run coverage xml -o ${{ env.REPORTS_DIR }}/coverage-${{ matrix.os }}-${{ matrix.python-version }}.xml &&
147152
poetry run coverage html -d ${{ env.REPORTS_DIR }}
153+
148154
- name: Artifact reports
149155
if: ${{ ! cancelled() }}
150-
# see https://github.com/actions/upload-artifact
151-
uses: actions/upload-artifact@v2
156+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
152157
with:
153158
name: ${{ env.REPORTS_ARTIFACT }}
154159
path: ${{ env.REPORTS_DIR }}

.github/workflows/deploy.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,19 @@ jobs:
4141
released: ${{ steps.after-release.outputs.released }} # optional bool-ish string
4242
version-after: ${{ steps.after-release.outputs.version }} # version may still be empty
4343
steps:
44-
- name: Checkout code
45-
# see https://github.com/actions/checkout
46-
uses: actions/checkout@v3
47-
with:
48-
fetch-depth: 0 # action `relekang/python-semantic-release` requires all git history
44+
- name: Checkout
45+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4946

50-
- name: Setup python ${{ env.PYTHON_VERSION }}
51-
# see https://github.com/actions/setup-python
52-
uses: actions/setup-python@v4
47+
- name: Set up Python
48+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5349
with:
54-
python-version: ${{ env.PYTHON_VERSION }}
50+
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
51+
architecture: 'x64'
5552

56-
- name: Install and configure Poetry
57-
# See https://github.com/marketplace/actions/install-poetry-action
58-
uses: snok/install-poetry@v1
53+
- name: Install poetry
54+
uses: Gr1N/setup-poetry@48b0f77c8c1b1b19cb962f0f00dff7b4be8f81ec # v9
5955
with:
60-
version: ${{ env.POETRY_VERSION }}
61-
virtualenvs-create: true
62-
virtualenvs-in-project: true
63-
installer-parallel: true
56+
poetry-version: ${{ env.POETRY_VERSION }}
6457

6558
- name: Install dependencies
6659
run: poetry install --no-root
@@ -69,9 +62,7 @@ jobs:
6962
run: poetry --version
7063

7164
- name: Python Semantic Release
72-
# see https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
73-
# see https://github.com/relekang/python-semantic-release
74-
uses: relekang/python-semantic-release@v7.31.2
65+
uses: python-semantic-release/python-semantic-release@5f28b835b0dbaaeaf2d80c6caaac3d66d4f7d0b0 # v7.31.2
7566
with:
7667
github_token: ${{ secrets.GITHUB_TOKEN }}
7768
repository_username: __token__

0 commit comments

Comments
 (0)