[ skip ci ] attempt to solve tibber websocket unrecovered failures #188
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: Build & Release | |
on: | |
push: | |
tags: | |
- '*' | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build_and_push: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Repository Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Generate container version tag | |
id: calver | |
run: | | |
echo "tag=$(TZ='Europe/Amsterdam' date +%Y.%m.%d.%H)" >> $GITHUB_OUTPUT | |
echo "repo=$(echo ${{ github.repository }} | tr [:upper:] [:lower:])" >> $GITHUB_OUTPUT | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Multiplatform docker build and push | |
uses: docker/build-push-action@v3 | |
with: | |
file: cerbomoticzGx.Dockerfile | |
platforms: linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/${{ steps.calver.outputs.repo }}:${{ steps.calver.outputs.tag }} | |
ghcr.io/${{ steps.calver.outputs.repo }}:latest | |
cache-from: type=registry,ref=ghcr.io/${{ steps.calver.outputs.repo }}:buildcache | |
cache-to: type=registry,ref=ghcr.io/${{ steps.calver.outputs.repo }}:buildcache,mode=max | |
- name: Generate release tag | |
uses: amitsingh-007/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.release_tag }} | |
release_name: Release ${{ env.release_tag }} |