Skip to content

Commit ee83abe

Browse files
committed
🎨 Put devpi creds into reusable vars @ GHA
1 parent 08af499 commit ee83abe

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/self-smoke-test-action.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on: # yamllint disable-line rule:truthy
77
pull_request:
88

99
env:
10+
devpi-password: abcd1234
11+
devpi-username: root
12+
1013
FORCE_COLOR: 1 # Request colored output from CLI tools supporting it
1114
MYPY_FORCE_COLOR: 1 # MyPy's color enforcement
1215
PIP_DISABLE_PIP_VERSION_CHECK: 1
@@ -26,11 +29,19 @@ jobs:
2629
smoke-test:
2730
runs-on: ubuntu-latest
2831

32+
env:
33+
TWINE_REPOSITORY_URL: >-
34+
http://devpi:${{
35+
job.services.devpi.ports['3141']
36+
}}/${{
37+
env.devpi-username
38+
}}/public/
39+
2940
services:
3041
devpi:
3142
image: muccg/devpi
3243
env:
33-
DEVPI_PASSWORD: abcd1234
44+
DEVPI_PASSWORD: ${{ env.devpi-password }}
3445
ports:
3546
- 3141
3647

@@ -54,17 +65,15 @@ jobs:
5465
- run: python3 -m build
5566
- run: twine register dist/*.tar.gz
5667
env:
57-
TWINE_USERNAME: root
58-
TWINE_PASSWORD: abcd1234
59-
TWINE_REPOSITORY_URL: >-
60-
http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
68+
TWINE_USERNAME: ${{ env.devpi-username }}
69+
TWINE_PASSWORD: ${{ env.devpi-password }}
6170
- uses: actions/checkout@v3
6271
with:
6372
path: test
6473
- uses: ./test
6574
with:
66-
user: root
67-
password: abcd1234
68-
repository_url: http://devpi:3141/root/public/
75+
user: ${{ env.devpi-username }}
76+
password: ${{ env.devpi-password }}
77+
repository_url: ${{ env.TWINE_REPOSITORY_URL }}
6978

7079
...

0 commit comments

Comments
 (0)