cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

build-continuwuity.yaml (3059B)


      1 name: Build Continuwuity Wrapper Image
      2 
      3 on:
      4   push:
      5     branches: ["main"]
      6     paths:
      7       - "apps/talos_cluster/continuwuity/Dockerfile"
      8       - ".github/workflows/build-continuwuity.yaml"
      9   schedule:
     10     # Rebuild daily at 03:00 UTC to pick up upstream :main changes
     11     - cron: "0 3 * * *"
     12   workflow_dispatch:
     13 
     14 permissions:
     15   contents: read
     16 
     17 jobs:
     18   build:
     19     #if: false  # disabled — replaced by in-cluster image-builder cronjob
     20     name: Build and Push
     21     runs-on: ubuntu-latest
     22     environment: registry
     23     steps:
     24       - name: Checkout
     25         uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
     26         with:
     27           persist-credentials: false
     28 
     29       - name: Set up QEMU
     30         uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
     31 
     32       - name: Set up Docker Buildx
     33         uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
     34 
     35       - name: Log in to self-hosted registry
     36         uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
     37         with:
     38           registry: registry.midnightthoughts.space
     39           username: ${{ secrets.REGISTRY_USERNAME }}
     40           password: ${{ secrets.REGISTRY_PASSWORD }}
     41 
     42       - name: Extract metadata
     43         id: meta
     44         uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6
     45         with:
     46           images: registry.midnightthoughts.space/mtrnord/cluster/continuwuity
     47           labels: |
     48             org.opencontainers.image.description=Continuwuity (Conduit fork) Matrix homeserver — multi-arch wrapper image
     49             org.opencontainers.image.title=continuwuity
     50             org.opencontainers.image.vendor=MTRNord
     51           tags: |
     52             type=raw,value=main
     53             type=raw,value={{date 'YYYYMMDD-HHmmss'}}
     54             type=sha,prefix=sha-
     55 
     56       - name: Install cosign
     57         uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
     58         with:
     59           cosign-release: v3.0.5
     60 
     61       - name: Build and push
     62         id: build
     63         uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7
     64         with:
     65           context: apps/talos_cluster/continuwuity
     66           file: apps/talos_cluster/continuwuity/Dockerfile
     67           push: true
     68           tags: ${{ steps.meta.outputs.tags }}
     69           labels: ${{ steps.meta.outputs.labels }}
     70           cache-from: type=gha
     71           cache-to: type=gha,mode=max
     72           platforms: linux/amd64,linux/arm64
     73 
     74       - name: Sign image
     75         env:
     76           COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
     77           COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
     78           COSIGN_OCI_EXPERIMENTAL: "1"
     79           COSIGN_EXPERIMENTAL: "1"
     80           DIGEST: ${{ steps.build.outputs.digest }}
     81         run: |
     82           cosign sign --yes --key env://COSIGN_PRIVATE_KEY \
     83             --new-bundle-format=false \
     84             --use-signing-config=false \
     85             --registry-referrers-mode=oci-1-1 \
     86             "registry.midnightthoughts.space/mtrnord/cluster/continuwuity@${DIGEST}"