Skip to content

implement zigbee2mqtt sensors (button devices) #8

implement zigbee2mqtt sensors (button devices)

implement zigbee2mqtt sensors (button devices) #8

Workflow file for this run

name: Main
on:
push:
branches: [ "main" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker images
run: make docker-build -e IMG_TAG=${GITHUB_REF#refs/heads/}
- name: Push docker images
run: make docker-push -e IMG_TAG=${GITHUB_REF#refs/heads/}
- name: Create & Push docker manifrst
run: make docker-manifest -e IMG_TAG=${GITHUB_REF#refs/heads/}