Skip to content

0.2.32

0.2.32 #88

Workflow file for this run

name: PublishAddon
env:
REGISTRY: ghcr.io
IMAGE_NAME: 'jehy/hass-dbstats-addon'
on:
release:
types: [published]
jobs:
release_db_stats_addon:
name: ReleaseDbStatsAddon
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=semver,pattern={{major}}
type=raw,value=stable
- name: Use Node.js 20.11.0
uses: actions/setup-node@v4
with:
node-version: 20.11.0
- name: 'change backend version'
uses: reedyuk/[email protected]
with:
version: ${{ env.DOCKER_METADATA_OUTPUT_VERSION }}
package: './dbstats/backend'
git-tag-version: 'false'
- name: 'change frontend version'
uses: reedyuk/[email protected]
with:
version: ${{ env.DOCKER_METADATA_OUTPUT_VERSION }}
package: './dbstats/frontend'
git-tag-version: 'false'
- name: Install shared deps
working-directory: ./dbstats/shared
run: npm ci
- name: Install backend deps
working-directory: ./dbstats/backend
run: npm ci
- name: build back
working-directory: ./dbstats/backend
run: npm run build
- name: clean back
working-directory: ./dbstats/backend
run: npm ci --omit=dev
- name: Install frontend deps
working-directory: ./dbstats/frontend
run: npm ci
- name: build front
working-directory: ./dbstats/frontend
run: npm run build
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: ./dbstats/addon.Dockerfile
context: ./dbstats
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}