Skip to content

Commit

Permalink
Update workflows + cr
Browse files Browse the repository at this point in the history
  • Loading branch information
adeepn committed Jul 2, 2024
1 parent 15d697a commit 8f61d55
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 37 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/jh-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
BUILD_TYPE: core
DEFAULT_PYTHON: "3.12"
DEFAULT_PYTHON: "3.12.3"
PIP_TIMEOUT: 60
UV_HTTP_TIMEOUT: 60
UV_SYSTEM_PYTHON: "true"
Expand All @@ -27,7 +27,7 @@ jobs:
publish: ${{ steps.version.outputs.publish }}
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6
with:
fetch-depth: 0

Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: update build.yaml
run: cp -f build-jethub.yaml build.yaml
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt
- name: Download translations
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
name: translations

Expand All @@ -206,7 +206,7 @@ jobs:
echo "${{ github.sha }};${{ github.ref }};${{ github.event_name }};${{ github.actor }}" > rootfs/OFFICIAL_IMAGE
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.1.0
uses: docker/login-action@v3.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
- tinker
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: update build.yaml
run: cp -f build-jethub.yaml build.yaml
Expand All @@ -278,7 +278,7 @@ jobs:
fi
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.1.0
uses: docker/login-action@v3.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -300,7 +300,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: update build.yaml
run: cp -f build-jethub.yaml build.yaml
Expand Down Expand Up @@ -340,29 +340,30 @@ jobs:
id-token: write
strategy:
matrix:
registry: ["ghcr.io/jethub-homeassistant", "docker.io/jethubjhaos"]
registry: ["ghcr.io/jethub-homeassistant", "cr.jethome.work/ha"]
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: Install Cosign
uses: sigstore/cosign-installer@v3.4.0
uses: sigstore/cosign-installer@v3.5.0
with:
cosign-release: "v2.2.3"

- name: update build.yaml
run: cp -f build-jethub.yaml build.yaml

- name: Login to DockerHub
if: matrix.registry == 'docker.io/jethubjhaos'
uses: docker/login-action@v3.1.0
if: matrix.registry == 'cr.jethome.work/ha'
uses: docker/login-action@v3.2.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: cr.jethome.work
username: ${{ secrets.CR_USERNAME }}
password: ${{ secrets.CR_TOKEN }}

- name: Login to GitHub Container Registry
if: matrix.registry == 'ghcr.io/jethub-homeassistant'
uses: docker/login-action@v3.1.0
uses: docker/login-action@v3.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand Down Expand Up @@ -421,9 +422,9 @@ jobs:
local image=${1}
local tag=${2}
docker tag "ghcr.io/jethub-homeassistant/${image}:${tag}" "docker.io/jethubjhaos/${image}:${tag}"
docker push "docker.io/jethubjhaos/${image}:${tag}"
cosign sign --yes "docker.io/jethubjhaos/${image}:${tag}"
docker tag "ghcr.io/jethub-homeassistant/${image}:${tag}" "cr.jethome.work/ha/${image}:${tag}"
docker push "cr.jethome.work/ha/${image}:${tag}"
cosign sign --yes "cr.jethome.work/ha/${image}:${tag}"
}
# Pull images from github container registry and verify signature
Expand All @@ -439,7 +440,7 @@ jobs:
validate_image "ghcr.io/jethub-homeassistant/armv7-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/jethub-homeassistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
if [[ "${{ matrix.registry }}" == "docker.io/jethubjhaos" ]]; then
if [[ "${{ matrix.registry }}" == "cr.jethome.work/ha" ]]; then
# Upload images to dockerhub
push_dockerhub "amd64-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "i386-homeassistant" "${{ needs.init.outputs.version }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jh-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- "**strings.json"

env:
DEFAULT_PYTHON: "3.11"
DEFAULT_PYTHON: "3.12.3"

jobs:
upload:
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: ${{ vars.RUNNER }}
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/[email protected]
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/jh-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ on:
workflow_call:

env:
DEFAULT_PYTHON: "3.12"
DEFAULT_PYTHON: "3.12.3"

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name}}
cancel-in-progress: true

jobs:
init:
name: Initialize wheels builder
Expand All @@ -34,7 +34,7 @@ jobs:
architectures: ${{ steps.info.outputs.architectures }}
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
Expand Down Expand Up @@ -120,15 +120,15 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: Download env_file
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
name: env_file

- name: Download requirements_diff
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
name: requirements_diff

Expand Down Expand Up @@ -158,20 +158,20 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/[email protected].3
uses: actions/[email protected].6

- name: Download env_file
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
name: env_file

- name: Download requirements_diff
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
name: requirements_diff

- name: Download requirements_all_wheels
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
name: requirements_all_wheels

Expand All @@ -194,7 +194,7 @@ jobs:
touch requirements_old-cython.txt
cat homeassistant/package_constraints.txt | grep 'grpcio==' >> requirements_old-cython.txt
cat homeassistant/package_constraints.txt | grep 'pydantic==' >> requirements_old-cython.txt
- name: Adjust build env
run: |
if [ "${{ matrix.arch }}" = "i386" ]; then
Expand All @@ -213,7 +213,7 @@ jobs:
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf;pydantic
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_old-cython.txt"
Expand All @@ -228,7 +228,7 @@ jobs:
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev;nasm"
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf;pydantic
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtaa"
Expand All @@ -242,7 +242,7 @@ jobs:
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev;nasm"
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf;pydantic
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtab"
Expand All @@ -256,7 +256,7 @@ jobs:
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev;nasm"
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf
skip-binary: aiohttp;charset-normalizer;grpcio;SQLAlchemy;protobuf;pydantic
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtac"

0 comments on commit 8f61d55

Please sign in to comment.