Release Build (HA Proxy-Addon) #31
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
# RaspberryMatic HA-Proxy Addon Release build | |
# yamllint disable rule:truthy | |
--- | |
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/[email protected] | |
with: | |
install: true | |
- name: Login to GitHub Container Registry | |
if: env.BUILD_ARGS != '--test' | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Extract docker metadata | |
id: meta | |
uses: docker/[email protected] | |
with: | |
images: ${{ steps.info.outputs.image }} | |
labels: | | |
org.opencontainers.image.title=RaspberryMatic HA Proxy-Addon | |
org.opencontainers.image.description=Proxy to externally running RaspberryMatic 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.title=RaspberryMatic HA Proxy-Addon | |
org.opencontainers.image.description=Proxy to externally running RaspberryMatic 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/[email protected] | |
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=Proxy to externally running RaspberryMatic 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=Proxy to externally running RaspberryMatic 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 }} |