Create build-and-publish.yaml
This commit is contained in:
28
.gitea/workflows/build-and-publish.yaml
Normal file
28
.gitea/workflows/build-and-publish.yaml
Normal 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}}
|
||||
Reference in New Issue
Block a user