Add GitHub Actions workflow for building and pushing development Docker image
All checks were successful
Build And Push Dev Docker Image / docker (push) Successful in 1m47s
All checks were successful
Build And Push Dev Docker Image / docker (push) Successful in 1m47s
This commit is contained in:
41
.gitea/workflows/docker-image-dev.yml
Normal file
41
.gitea/workflows/docker-image-dev.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Build And Push Dev Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOTNET_ROLL_FORWARD: Major
|
||||
REGISTRY: git.beging.de
|
||||
BASE_IMAGE: git.beging.de/troogs/fs-onboarding-server
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: "9.0.x"
|
||||
|
||||
- name: Publish server project
|
||||
run: dotnet publish ./FoodsharingSiegen.Server/FoodsharingSiegen.Server.csproj -c Release -o ./Publish/Server
|
||||
|
||||
- name: Login to Gitea registry
|
||||
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY }}" -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build docker image
|
||||
run: |
|
||||
docker build \
|
||||
-f ./Docker/dockerfile.server \
|
||||
-t "${{ env.BASE_IMAGE }}:dev" \
|
||||
.
|
||||
|
||||
- name: Push docker images
|
||||
run: |
|
||||
docker push "${{ env.BASE_IMAGE }}:dev"
|
||||
Reference in New Issue
Block a user