Add docker snapshot workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s Details
Build and publish docker image snapshot / build-and-publish (push) Successful in 3m29s Details

This commit is contained in:
Stefan Forstenlechner 2024-08-19 20:10:23 +02:00
parent 024dc2ca4f
commit 7a9d051615
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
name: Build and publish docker image snapshot
run-name: ${{ gitea.actor }} runs ci pipeline
on: [ push ]
jobs:
build-and-publish:
runs-on: ubuntu-latest
if: gitea.ref == 'refs/heads/master'
steps:
- uses: https://github.com/actions/checkout@v4
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: gitea.forstenlechner.dev
username: stefan
password: ${{ secrets.ACTION_TOKEN }}
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
push: true
tags: |
gitea.forstenlechner.dev/stefan/simple-picture-gallery:${{gitea.sha}}
gitea.forstenlechner.dev/stefan/simple-picture-gallery:latest