Removed compose/docker steps as Portainer CE doesn't allow automating deployments.
All checks were successful
Build and Push Docker Image / docker (push) Successful in 31s

This commit is contained in:
2025-07-06 15:47:16 +02:00
parent 238202c45b
commit a50bd4cf65
6 changed files with 1 additions and 51 deletions

View File

@ -1,26 +0,0 @@
name: Build and Push Docker Image
on:
push:
jobs:
build:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:9.0
steps:
- name: Install Node.js and dependencies
run: |
apt-get update
apt-get install -y curl gnupg
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -y nodejs git
- name: Checkout
uses: actions/checkout@v3
- name: Restore dependencies
run: dotnet restore ./code/MessengerApi/MessengerApi.csproj
- name: Build project
run: dotnet build ./code/MessengerApi/MessengerApi.csproj -c Release

View File

@ -20,10 +20,4 @@ jobs:
run: |
IMAGE=gitea.masita.net/mc/messengerapi:latest
docker build -t $IMAGE .
docker push $IMAGE
- name: Redeploy Portainer Stack
run: |
curl -k -X POST "${{ secrets.PORTAINER_URL }}/api/stacks/${{ secrets. PORTAINER_STACK_ID_MESSENGER_API_DEVELOP }}/redeploy" \
-H "Authorization: Bearer ${{ secrets.PORTAINER_TOKEN }}" \
-H "Content-Type: application/json"
docker push $IMAGE