38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
on: [push]
|
|
jobs:
|
|
build-container:
|
|
runs-on: docker
|
|
container:
|
|
image: library/docker:dind
|
|
steps:
|
|
- run: apk add --no-cache nodejs git
|
|
- name: login to container registry
|
|
run: echo "${{ secrets.PACKAGE_PUBLISH_TOKEN }}" | docker login --username finn --password-stdin git.janky.solutions
|
|
- name: gather metadata for container image tags
|
|
uses: https://github.com/docker/metadata-action@v5
|
|
id: meta
|
|
with:
|
|
images: git.janky.solutions/finn/lockserver
|
|
- name: build container image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
file: Containerfile
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
push: true
|
|
release:
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: update hassio-addons
|
|
run: |
|
|
echo "${DEPLOY_SSH_KEY}" >> ~/.ssh/id_edi25519
|
|
chmod 600 ~/.ssh/id_edi25519
|
|
|
|
set -exuo pipefail
|
|
git clone git@git.janky.solutions:finn/hassio-addons.git
|
|
cd hassio-addons
|
|
sed -i "s#version: v.*#version: ${GITHUB_REF_NAME}#" lockserver/config.yaml
|
|
git commit -am "bump lockserver to ${GITHUB_REF_NAME}"
|
|
git push
|