Skip to content

Add pip.conf with defaults (#641) #255

Add pip.conf with defaults (#641)

Add pip.conf with defaults (#641) #255

Workflow file for this run

name: "Publish"
on:
release:
types: [published]
push:
branches:
- master
jobs:
publish:
name: Publish builder
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
abi: ["cp311", "cp312"]
tag: ["musllinux_1_2"]
arch: ["aarch64", "armhf", "armv7", "amd64", "i386"]
include:
- abi: cp311
tag: musllinux_1_2
base: 3.11-alpine3.18
- abi: cp312
tag: musllinux_1_2
base: 3.12-alpine3.18
steps:
- name: Checkout the repository
uses: actions/[email protected]
- shell: bash
id: info
run: |
declare -a docker
name="ghcr.io/home-assistant/wheels/${{ matrix.arch }}/${{ matrix.tag }}/${{ matrix.abi }}"
version=$(echo "${{ github.ref }}" | awk -F"/" '{print $NF}' )
if [ "${version}" = "master" ]; then
version=dev
fi
base="ghcr.io/home-assistant/${{ matrix.arch }}-base-python:${{ matrix.base }}"
if [ "${{ matrix.arch }}" = "armhf" ]; then
docker+=("--build-arg QEMU_CPU=arm1176")
fi
if docker pull "$name:dev" > /dev/null 2>&1; then
docker+=("--cache-from $name:dev")
fi
echo "name=$name" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
echo "base=$base" >> $GITHUB_OUTPUT
echo "docker=${docker[@]}" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- shell: bash
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- shell: bash
run: |
docker build \
-t ${{ steps.info.outputs.name }}:${{ steps.info.outputs.version }} \
${{ steps.info.outputs.docker }} \
--build-arg "BUILD_FROM=${{ steps.info.outputs.base }}" \
--build-arg "BUILD_ARCH=${{ matrix.arch }}" \
--build-arg "CPYTHON_ABI=${{ matrix.abi }}" \
.
- shell: bash
run: |
docker push ${{ steps.info.outputs.name }}:${{ steps.info.outputs.version }}