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
All checks were successful
Build and Push Docker Image / docker (push) Successful in 31s
This commit is contained in:
@ -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
|
||||
@ -21,9 +21,3 @@ jobs:
|
||||
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"
|
||||
@ -28,7 +28,6 @@ EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\Directory.Packages.props = ..\Directory.Packages.props
|
||||
..\docker-compose.yml = ..\docker-compose.yml
|
||||
..\Dockerfile = ..\Dockerfile
|
||||
..\assets\example-users.config = ..\assets\example-users.config
|
||||
..\NuGet.config = ..\NuGet.config
|
||||
@ -36,7 +35,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\.gitea\workflows\build.yml = ..\.gitea\workflows\build.yml
|
||||
..\.gitea\workflows\docker-build-and-push.yml = ..\.gitea\workflows\docker-build-and-push.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||
USER app
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
COPY ./publish .
|
||||
ENTRYPOINT ["dotnet", "MessengerApi.dll"]
|
||||
@ -4,7 +4,6 @@
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"PERSISTENCE_TYPE": "Sql",
|
||||
"USERSCONFIG_FILE_PATH": "./../../assets/example-users.config",
|
||||
"SQL_CONNECTIONSTRING": ""
|
||||
"CORS_ORIGINS": "",
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
services:
|
||||
messengerapi:
|
||||
image: https://gitea.masita.net/mc/messengerapi:latest
|
||||
container_name: messengerapi
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
Reference in New Issue
Block a user