2024-04-24 01:07:32 +00:00
|
|
|
on: [push]
|
2024-04-24 00:34:57 +00:00
|
|
|
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
|
2024-11-23 03:50:18 +00:00
|
|
|
- name: gather metadata for container image tags
|
|
|
|
uses: https://github.com/docker/metadata-action@v5
|
2024-04-24 01:07:32 +00:00
|
|
|
id: meta
|
|
|
|
with:
|
|
|
|
images: git.janky.solutions/finn/lockserver
|
2024-04-24 01:00:03 +00:00
|
|
|
- name: build container image
|
2024-09-08 08:02:34 +00:00
|
|
|
uses: docker/build-push-action@v6
|
2024-04-24 00:34:57 +00:00
|
|
|
with:
|
|
|
|
file: Containerfile
|
2024-04-24 01:07:32 +00:00
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2024-04-24 04:22:19 +00:00
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
2024-04-24 00:34:57 +00:00
|
|
|
push: true
|
2024-11-23 07:37:16 +00:00
|
|
|
- name: update hassio-addons
|
2024-11-23 08:01:04 +00:00
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
2024-11-23 07:37:16 +00:00
|
|
|
run: |
|
2024-11-23 08:48:06 +00:00
|
|
|
mkdir ~/.ssh
|
|
|
|
echo "${{ secrets.DEPLOY_SSH_KEY }}" >> ~/.ssh/id_ed25519
|
|
|
|
chmod 600 ~/.ssh/id_ed25519
|
2024-11-23 07:47:54 +00:00
|
|
|
echo "git.janky.solutions ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDst5sxtaG74H62tHFyrxVyNhMmMNmvu/nXO/TqCaHoz1IbmKL6XEyOTC1Qy78GmCn1DVlZwx+pzEOed9s8REgu2j6DMeZ/qZ2+KBlsboSChdvppzXJj+7TrIdl2rqllAm3aJgKOXGkQdtd8rqaD62rzdaP/rt92Vp1DEavUORMCZ2sP0m7Etoj7FtUStaTMy/aUD+RtBdcZm+vV0xer0G46NSc4q127XTW2ZKwLrRZzve2NUo26Vkfnykgho5G2l5zvw7Zd6S9Rn+WdiQ5HE+cMmTU+AY2CAX8iPBhusDiuLc6Rou/ptqDOnZq2zggXMWJeeE31m5Oz2q6n26Ef7tbCzFgaZ34lNwp3EFzmpHetnNaFKx3z8sd9iGuWvk3evWFjXRAT382wKiIYKe8b3hgiizEP7eY0Hhey/A6Iv3PcQVr7DVr/BVzbWDZxPXtOJprCFgfgd9KOHcV5s3UD5k4+pNdgI+HuvAC13fv0rTxCshHMBWfgSofJ+zkqt+Jc9M=" >> ~/.ssh/known_hosts
|
2024-11-23 07:37:16 +00:00
|
|
|
|
2024-11-23 08:48:06 +00:00
|
|
|
set -ex
|
2024-11-23 07:37:16 +00:00
|
|
|
git clone git@git.janky.solutions:finn/hassio-addons.git
|
|
|
|
cd hassio-addons
|
2024-11-23 09:59:41 +00:00
|
|
|
git config user.name "${GITHUB_REPOSITORY}"
|
2024-11-23 08:48:06 +00:00
|
|
|
git config user.email "${GITHUB_REPOSITORY}@noreply.git.janky.solutions"
|
2024-11-23 07:37:16 +00:00
|
|
|
sed -i "s#version: v.*#version: ${GITHUB_REF_NAME}#" lockserver/config.yaml
|
|
|
|
git commit -am "bump lockserver to ${GITHUB_REF_NAME}"
|
|
|
|
git push
|