Files
perceptron-viewer/.gitea/workflows/docker-publish.yaml
T
Ninluc 538ddc9679
linter / quality (push) Successful in 6m42s
tests / ci (8.3) (push) Successful in 5m46s
Fix reverb
2026-09-17 18:58:54 +02:00

66 lines
1.8 KiB
YAML

name: Build and Push Docker Image
on:
workflow_run:
workflows: ["tests"]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
RUNNER_TOOL_CACHE: /toolcache
REVERB_APP_KEY: ${{ secrets.REVERB_APP_KEY }}
REVERB_APP_SECRET: ${{ secrets.REVERB_APP_SECRET }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Get version
id: get_version
run: echo "::set-output name=version::$(cat VERSION)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.matthiasg.dev
username: ninluc
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Cache Docker layers (registry-backed)
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: buildx-cache-${{ github.sha }}
restore-keys: |
buildx-cache-
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
build-args: |
VITE_REVERB_APP_KEY=${{ secrets.REVERB_APP_KEY }}
VITE_REVERB_HOST=perceptron.matthiasg.dev
VITE_REVERB_PORT=443
VITE_REVERB_SCHEME=https
tags: git.matthiasg.dev/ninluc/perceptron-viewer/perceptron-viewer:latest, git.matthiasg.dev/ninluc/perceptron-viewer/perceptron-viewer:${{ steps.get_version.outputs.version }}
# notify:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Notify Watchtower
# run: "curl -i -X POST -H \"Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}\" https://watchtower.beermaker.matthiasg.dev/v1/update"