Skip to content

Commit cbd690c

Browse files
committed
ci: Remove ./ci docker run image
This change replaces the `ci docker run [image-name]` with using the `container` images on the workflows so we can use these images during workflow runtime and calls commands and scripts from here instead.
1 parent 0e69725 commit cbd690c

File tree

3 files changed

+46
-17
lines changed

3 files changed

+46
-17
lines changed

.github/workflows/on-pull-request.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,51 @@ jobs:
1515
# Filter out Draft Pull Requests
1616
if: github.event.pull_request.draft == false
1717
runs-on: ubuntu-latest
18+
container: qctrl/ci-images:python-3.11-ci
19+
defaults:
20+
run:
21+
shell: bash
1822
steps:
1923
- uses: actions/checkout@v4
2024
- name: Ensure no development packages have been set
2125
run: |
2226
source <(curl -sL http://ci.q-ctrl.com)
23-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/check-for-internal-versions.sh
27+
/scripts/check-for-internal-versions.sh
2428
linting:
2529
# Filter out PRs originating from this repository (triggers on-push.yml instead)
2630
if: github.event.pull_request.head.repo.fork == true
2731
runs-on: ubuntu-latest
32+
container: qctrl/ci-images:python-3.11-ci
33+
defaults:
34+
run:
35+
shell: bash
2836
steps:
2937
- uses: actions/checkout@v4
3038
- name: Install Python dependencies
3139
run: |
32-
source <(curl -sL http://ci.q-ctrl.com)
33-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/install-python-dependencies.sh
40+
/scripts/install-python-dependencies.sh
3441
- name: Run Pre-Commit
3542
run: |
36-
./ci docker run qctrl/ci-images:python-3.11-ci poetry run pre-commit run -- -a
43+
poetry run pre-commit run -- -a
3744
pytest:
3845
# Filter out PRs originating from this repository (triggers on-push.yml instead)
3946
if: github.event.pull_request.head.repo.fork == true
4047
runs-on: ubuntu-latest
48+
container: qctrl/ci-images:python-${{ matrix.python }}-ci
49+
defaults:
50+
run:
51+
shell: bash
4152
strategy:
4253
matrix:
4354
python: ["3.9", "3.10", "3.11"]
4455
steps:
4556
- uses: actions/checkout@v4
4657
- name: Install Python dependencies
4758
run: |
48-
source <(curl -sL http://ci.q-ctrl.com)
49-
./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/install-python-dependencies.sh
59+
/scripts/install-python-dependencies.sh
5060
- name: Run Pytest
5161
run: |
52-
./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/pytest.sh
62+
/scripts/pytest.sh
5363
sphinx_documentation:
5464
# Filter out PRs originating from this repository (triggers on-push.yml instead)
5565
if: github.event.pull_request.head.repo.fork == true

.github/workflows/on-push.yaml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
jobs:
1111
housekeeping:
1212
runs-on: ubuntu-latest
13+
container: qctrl/ci-images:google-cloud-sdk-ci
14+
defaults:
15+
run:
16+
shell: bash
1317
steps:
1418
- uses: actions/checkout@v4
1519
- name: Perform housekeeping checks
@@ -18,23 +22,31 @@ jobs:
1822
run: |
1923
source <(curl -sL http://ci.q-ctrl.com)
2024
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
21-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/housekeeping.sh
25+
/scripts/housekeeping.sh
2226
2327
linting:
2428
runs-on: ubuntu-latest
29+
container: qctrl/ci-images:python-3.11-ci
30+
defaults:
31+
run:
32+
shell: bash
2533
steps:
2634
- uses: actions/checkout@v4
2735
- name: Install Python dependencies
2836
run: |
2937
source <(curl -sL http://ci.q-ctrl.com)
3038
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
31-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/install-python-dependencies.sh
39+
/scripts/install-python-dependencies.sh
3240
- name: Run Pre-Commit
3341
run: |
34-
./ci docker run qctrl/ci-images:python-3.11-ci poetry run pre-commit run -- -a
42+
poetry run pre-commit run -- -a
3543
3644
pytest:
3745
runs-on: ubuntu-latest
46+
container: qctrl/ci-images:python-${{ matrix.python }}-ci
47+
defaults:
48+
run:
49+
shell: bash
3850
strategy:
3951
matrix:
4052
python: ["3.9", "3.10", "3.11"]
@@ -44,13 +56,17 @@ jobs:
4456
run: |
4557
source <(curl -sL http://ci.q-ctrl.com)
4658
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
47-
./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/install-python-dependencies.sh
59+
/scripts/install-python-dependencies.sh
4860
- name: Run Pytest
4961
run: |
50-
./ci docker run qctrl/ci-images:python-${{ matrix.python }}-ci /scripts/pytest.sh
62+
/scripts/pytest.sh
5163
5264
publish_internally:
5365
runs-on: ubuntu-latest
66+
container: qctrl/ci-images:python-3.11-ci
67+
defaults:
68+
run:
69+
shell: bash
5470
steps:
5571
- uses: actions/checkout@v4
5672
- name: Publish development version
@@ -59,4 +75,4 @@ jobs:
5975
run: |
6076
source <(curl -sL http://ci.q-ctrl.com)
6177
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
62-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/publish-dev-version.sh
78+
/scripts/publish-dev-version.sh

.github/workflows/on-release.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
jobs:
88
release:
99
runs-on: ubuntu-latest
10+
container: qctrl/ci-images:python-3.11-ci
11+
defaults:
12+
run:
13+
shell: bash
1014
steps:
1115
- uses: actions/checkout@v4
1216
with:
@@ -17,16 +21,15 @@ jobs:
1721
run: |
1822
source <(curl -sL http://ci.q-ctrl.com)
1923
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
20-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/housekeeping.sh
24+
/scripts/housekeeping.sh
2125
- name: Publish publicly
2226
env:
2327
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2428
run: |
25-
source <(curl -sL http://ci.q-ctrl.com)
26-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/publish-release-publicly.sh
29+
/scripts/publish-release-publicly.sh
2730
- name: Publish internally
2831
run: |
29-
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/publish-release-internally.sh
32+
/scripts/publish-release-internally.sh
3033
3134
update_documentation:
3235
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)