Create build-and-publish.yaml

This commit is contained in:
2026-04-03 14:40:30 +02:00
parent 861ea03c5b
commit 1776ada5ee

View File

@@ -0,0 +1,28 @@
name: mnemo-build-and-publish
run-name: Mnemosyne Build&Publish by ${{gitea.actor}} on ${{gitea.ref_name}}
on:
push:
branches:
- master
jobs:
gractwo-mnemo-build:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: set short sha
run: echo "short_sha=$(echo ${{gitea.sha}} | cut -c1-12)" >> $GITEA_ENV
- name: build image
run: |
docker buildx build --platform linux/amd64 \
-t git.gractwo.pl/gractwo/mnemosyne:${{env.short_sha}} \
.
- name: log into package registry
uses: docker/login-action@v3
with:
registry: git.gractwo.pl
username: ${{gitea.actor}}
password: ${{secrets.TOKEN2}}
- name: publish
run: docker push git.gractwo.pl/gractwo/mnemosyne:${{env.short_sha}}