.gitea/workflows/buildDocker.yaml hinzugefügt
This commit is contained in:
31
.gitea/workflows/buildDocker.yaml
Normal file
31
.gitea/workflows/buildDocker.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.example.com
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }} # Der Token für das eigene Repo, ggf. als PAT erzeugen
|
||||
|
||||
- name: Build and Push Docker Image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: gitea.example.com/${{ gitea.owner }}/${{ gitea.repo }}:${{ gitea.sha }},gitea.example.com/${{ gitea.owner }}/${{ gitea.repo }}:latest
|
||||
Reference in New Issue
Block a user