Release Build (HA Proxy-Addon) #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Release Build (HA Proxy-Addon) | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build HA Proxy-Addon | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Get information | |
id: info | |
uses: home-assistant/actions/helpers/info@master | |
with: | |
path: "./home-assistant-addon-proxy" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3.7.1 | |
with: | |
install: true | |
- name: Login to GitHub Container Registry | |
if: env.BUILD_ARGS != '--test' | |
uses: docker/login-action@v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Extract docker metadata | |
id: meta | |
uses: docker/metadata-action@v5.5.1 | |
with: | |
images: ${{ steps.info.outputs.image }} | |
labels: | | |
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | |
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | |
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | |
org.opencontainers.image.version=${{ steps.info.outputs.version }} | |
org.opencontainers.image.url=https://raspberrymatic.de | |
annotations: | | |
org.opencontainers.image.description=Alternative OS for your homematicIP CCU | |
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | |
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | |
org.opencontainers.image.version=${{ steps.info.outputs.version }} | |
org.opencontainers.image.url=https://raspberrymatic.de | |
env: | |
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index | |
- name: Build OCI tags | |
id: extract_branch | |
shell: bash | |
run: | | |
BASE_TAG=${{ steps.info.outputs.image }} | |
UNIQUE_TAG="${BASE_TAG}:${{ steps.info.outputs.version }}" | |
BRANCH="${GITHUB_REF##*/}" | |
if [[ ${BRANCH} == 'master' ]]; then | |
BRANCH_TAG="${BASE_TAG}:latest" | |
else | |
BRANCH_TAG="${BASE_TAG}:latest-${BRANCH}" | |
fi | |
echo "unique_tag=${UNIQUE_TAG}" >> $GITHUB_OUTPUT | |
echo "branch_tag=${BRANCH_TAG}" >> $GITHUB_OUTPUT | |
- name: Build and push container image | |
uses: docker/build-push-action@v6.9.0 | |
id: docker_build | |
with: | |
context: home-assistant-addon-proxy | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 | |
push: true | |
labels: | | |
org.opencontainers.image.title=RaspberryMatic HA Proxy-Addon | |
org.opencontainers.image.description=A web proxy to your homematicIP CCU | |
org.opencontainers.image.vendor=RasperryMatic OpenSource Project | |
org.opencontainers.image.authors=RaspberryMatic OpenSource Team | |
org.opencontainers.image.licenses=Apache-2.0 | |
org.opencontainers.image.url=https://raspberrymatic.de | |
org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/wiki | |
org.opencontainers.image.revision=${{ github.sha }} | |
org.opencontainers.image.version=${{ steps.info.outputs.version }} | |
io.hass.name=RaspberryMatic CCU (Proxy) | |
io.hass.description=A web proxy to your homematicIP CCU | |
io.hass.url=https://github.com/${{ github.repository }}/tree/master/home-assistant-addon-proxy | |
io.hass.version=${{ steps.info.outputs.version }} | |
io.hass.type=addon | |
io.hass.arch=armv7|aarch64|amd64 | |
tags: | | |
${{ steps.extract_branch.outputs.unique_tag }} | |
${{ steps.extract_branch.outputs.branch_tag }} | |
annotations: | | |
${{ steps.meta.outputs.annotations }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |