infra/.forgejo/workflows/build-synapse.yaml
Finn 29f22759a4
All checks were successful
/ build-synapse (push) Successful in 17s
/ roll out update (push) Successful in 4s
move rollout to separate job
2024-11-26 13:29:00 -08:00

34 lines
1.2 KiB
YAML

on:
push:
paths:
- containers/synapse/**
- .forgejo/workflows/build-synapse.yaml
jobs:
build-synapse:
runs-on: docker
container:
image: library/docker:dind
steps:
- run: apk add --no-cache nodejs git
- name: login to container registry
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login --username ${{ secrets.DEPLOY_USER }} --password-stdin git.janky.solutions
- name: build container image
uses: docker/build-push-action@v6
with:
file: containers/synapse/Containerfile
tags: git.janky.solutions/jankysolutions/infra/synapse:latest
platforms: linux/amd64
push: ${{ github.ref == 'refs/heads/main' }}
rollout:
name: roll out update
runs-on: ubuntu-latest
container:
image: git.janky.solutions/jankysolutions/infra/deployer:latest
needs: [build-synapse]
if: github.ref == 'refs/heads/main'
steps:
- name: roll out update
run: |
set -euo pipefail
echo "${{ secrets.KUBERNETES_CLIENT_CONFIG }}" > ~/.kube/config
kubectl -n matrix rollout restart statefulset homeserver-janky-solutions