Files
perceptron-viewer/.github/workflows/docker-publish.yaml
T
Ninluc 5d71962893
linter / quality (push) Successful in 4m26s
tests / ci (8.4) (push) Successful in 4m24s
tests / ci (8.5) (push) Successful in 4m24s
Docker and CICD
2026-09-16 20:03:18 +02:00

50 lines
1.3 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
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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: Log in to Docker Hub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
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"