From eb6014360b42755d7fc3b80dfde116819e4c75a6 Mon Sep 17 00:00:00 2001 From: Viacheslav Bocharov Date: Thu, 6 Jun 2024 10:24:07 +0300 Subject: [PATCH] Move to patching original workflow --- .github/workflows/jh-publish.yml | 78 -------------------------------- .github/workflows/publish.yml | 10 ++-- 2 files changed, 5 insertions(+), 83 deletions(-) delete mode 100644 .github/workflows/jh-publish.yml diff --git a/.github/workflows/jh-publish.yml b/.github/workflows/jh-publish.yml deleted file mode 100644 index 43ec4fb5..00000000 --- a/.github/workflows/jh-publish.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: "JH Publish" - -on: - release: - types: [published] - push: - branches: - - master-jethub - -jobs: - publish: - name: Publish builder - runs-on: ${{ vars.RUNNER }} - strategy: - fail-fast: False - matrix: - abi: ["cp312"] - tag: ["musllinux_1_2"] - arch: ["aarch64", "armhf", "armv7", "amd64", "i386"] - include: - - abi: cp312 - tag: musllinux_1_2 - base: 3.12-alpine3.19 - steps: - - name: Checkout the repository - uses: actions/checkout@v4.1.6 - - - shell: bash - id: info - run: | - declare -a docker - - name="ghcr.io/jethub-homeassistant/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/jethub-homeassistant/${{ 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/login-action@v3.2.0 - 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 }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de5a69e2..a2fe4993 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,16 +1,16 @@ -name: "Publish" +name: "JH Publish" on: release: types: [published] push: branches: - - master + - master-jethub jobs: publish: name: Publish builder - runs-on: ubuntu-latest + runs-on: ${{ vars.RUNNER }} strategy: fail-fast: False matrix: @@ -30,14 +30,14 @@ jobs: run: | declare -a docker - name="ghcr.io/home-assistant/wheels/${{ matrix.arch }}/${{ matrix.tag }}/${{ matrix.abi }}" + name="ghcr.io/jethub-homeassistant/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 }}" + base="ghcr.io/jethub-homeassistant/${{ matrix.arch }}-base-python:${{ matrix.base }}" if [ "${{ matrix.arch }}" = "armhf" ]; then docker+=("--build-arg QEMU_CPU=arm1176")