File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Auto-merge Dependabot PR
22
33on :
4- pull_request :
4+ # XXX: !!! SECURITY WARNING !!!
5+ # pull_request_target has write access to the repo, and can read secrets. We
6+ # need to audit any external actions executed in this workflow and make sure no
7+ # checked out code is run (not even installing dependencies, as installing
8+ # dependencies usually can execute pre/post-install scripts). We should also
9+ # only use hashes to pick the action to execute (instead of tags or branches).
10+ # For more details read:
11+ # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
12+ pull_request_target :
513
614permissions :
7- contents : write
15+ contents : read
816 pull-requests : write
917
1018jobs :
1119 auto-merge :
12- if : github.actor == 'dependabot[bot]'
13- runs-on : ubuntu-latest
20+ name : Auto-merge Dependabot PR
21+ if : >
22+ github.actor == 'dependabot[bot]' &&
23+ !contains(github.event.pull_request.title, 'the repo-config group')
24+ runs-on : ubuntu-slim
1425 steps :
26+ - name : Generate GitHub App token
27+ id : app-token
28+ uses : actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
29+ with :
30+ app-id : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
31+ private-key : ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
32+
1533 - name : Auto-merge Dependabot PR
16- uses : frequenz-floss/dependabot-auto-approve@e943399cc9d76fbb6d7faae446cd57301d110165 # v1.5.0
34+ uses : frequenz-floss/dependabot-auto-approve@e943399cc9d76fbb6d7faae446cd57301d110165 # v1.5.0
1735 with :
18- github-token : ${{ secrets.GITHUB_TOKEN }}
36+ github-token : ${{ steps.app-token.outputs.token }}
1937 dependency-type : ' all'
2038 auto-merge : ' true'
2139 merge-method : ' merge'
Original file line number Diff line number Diff line change 2828 strategy :
2929 fail-fast : false
3030 matrix :
31- arch :
32- - amd64
33- - arm
34- os :
31+ platform :
3532 - ubuntu-24.04
33+ - ubuntu-24.04-arm
3634 python :
3735 - " 3.11"
3836 - " 3.12"
4139 # that uses the same venv to run multiple linting sessions
4240 - " ci_checks_max"
4341 - " pytest_min"
44- runs-on : ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
42+ runs-on : ${{ matrix.platform }}
4543
4644 steps :
4745 - name : Run nox
6058 needs : ["nox"]
6159 # We skip this job only if nox was also skipped
6260 if : always() && needs.nox.result != 'skipped'
63- runs-on : ubuntu-24.04
61+ runs-on : ubuntu-slim
6462 env :
6563 DEPS_RESULT : ${{ needs.nox.result }}
6664 steps :
@@ -105,15 +103,13 @@ jobs:
105103 strategy :
106104 fail-fast : false
107105 matrix :
108- arch :
109- - amd64
110- - arm
111- os :
106+ platform :
112107 - ubuntu-24.04
108+ - ubuntu-24.04-arm
113109 python :
114110 - " 3.11"
115111 - " 3.12"
116- runs-on : ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
112+ runs-on : ${{ matrix.platform }}
117113
118114 steps :
119115 - name : Setup Git
@@ -161,7 +157,7 @@ jobs:
161157 needs : ["test-installation"]
162158 # We skip this job only if test-installation was also skipped
163159 if : always() && needs.test-installation.result != 'skipped'
164- runs-on : ubuntu-24.04
160+ runs-on : ubuntu-slim
165161 env :
166162 DEPS_RESULT : ${{ needs.test-installation.result }}
167163 steps :
@@ -276,7 +272,7 @@ jobs:
276272 # discussions to create the release announcement in the discussion forums
277273 contents : write
278274 discussions : write
279- runs-on : ubuntu-24.04
275+ runs-on : ubuntu-slim
280276 steps :
281277 - name : Download distribution files
282278 uses : actions/download-artifact@v6
Original file line number Diff line number Diff line change 55
66jobs :
77 DCO :
8- runs-on : ubuntu-latest
8+ runs-on : ubuntu-slim
99 if : ${{ github.actor != 'dependabot[bot]' }}
1010 steps :
1111 - run : echo "This DCO job runs on merge_queue event and doesn't check PR contents"
Original file line number Diff line number Diff line change 77 permissions :
88 contents : read
99 pull-requests : write
10- runs-on : ubuntu-latest
10+ runs-on : ubuntu-slim
1111 steps :
1212 - name : Labeler
1313 # XXX: !!! SECURITY WARNING !!!
Original file line number Diff line number Diff line change 1616jobs :
1717 check-release-notes :
1818 name : Check release notes are updated
19- runs-on : ubuntu-latest
19+ runs-on : ubuntu-slim
2020 steps :
2121 - name : Check for a release notes update
2222 if : github.event_name == 'pull_request'
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ build-backend = "setuptools.build_meta"
1313name = " frequenz-quantities"
1414description = " Types for holding quantities with units"
1515readme = " README.md"
16- license = { text = " MIT" }
16+ license = " MIT"
17+ license-files = [" LICENSE" ]
1718keywords = [
1819 " frequenz" ,
1920 " python" ,
@@ -26,7 +27,6 @@ keywords = [
2627classifiers = [
2728 " Development Status :: 3 - Alpha" ,
2829 " Intended Audience :: Developers" ,
29- " License :: OSI Approved :: MIT License" ,
3030 " Programming Language :: Python :: 3" ,
3131 " Programming Language :: Python :: 3 :: Only" ,
3232 " Topic :: Software Development :: Libraries" ,
@@ -43,6 +43,7 @@ email = "floss@frequenz.com"
4343[project .optional-dependencies ]
4444dev-flake8 = [
4545 " flake8 == 7.3.0" ,
46+ " flake8-datetimez == 20.10.0" ,
4647 " flake8-docstrings == 1.7.0" ,
4748 " flake8-pyproject == 1.2.4" , # For reading the flake8 config from pyproject.toml
4849 " pydoclint == 0.8.3" ,
You can’t perform that action at this time.
0 commit comments