Skip to content

Commit a696a72

Browse files
Use pipx to install build dependencies on GHA runners (#370)
* Install pip on build runners * Fixing pip commands to be pipx --------- Co-authored-by: alisonlhart <[email protected]>
1 parent 6c8702b commit a696a72

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/actions/build-test/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ runs:
2626
run: |
2727
platform=${{ matrix.platform }}
2828
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
29+
sudo apt install -y python3-pip python3-build pipx
2930
3031
- name: Set up Docker Buildx
3132
uses: docker/setup-buildx-action@v3
@@ -37,7 +38,8 @@ runs:
3738
shell: bash
3839
id: ansible-builder-install
3940
run: |
40-
python3 -m pip install -U ansible-builder build
41+
set -ex
42+
python3 -m pipx install --force ansible-builder
4143
python3 -m build --outdir final/dist/ --wheel
4244
4345
- name: Create a build context and Containerfile for base EE
@@ -83,14 +85,13 @@ runs:
8385
- name: Squash image layers to save disk space
8486
shell: bash
8587
run: |
86-
python3 -m pip install --upgrade docker-squash
88+
python3 -m pipx install --force docker-squash
8789
docker-squash ${{ inputs.namespace }}/${{ inputs.final_image }}:test
8890
8991
- name: Run tests against the container
9092
shell: bash
9193
run: |
92-
python3 -m pip install --upgrade pip
93-
python3 -m pip install --upgrade "tox>=4.0.0"
94+
python3 -m pipx install --force "tox>=4.0.0"
9495
tox -e test-image -- --container-engine docker --image-name ${{ inputs.namespace }}/${{ inputs.final_image }}:test
9596
9697
- name: Push the built image to ${{ inputs.registry }} by digest for ${{ matrix.platform }}

0 commit comments

Comments
 (0)