name: GoogleApi on: push: branches: [master] paths: - 'GoogleApi/**' - 'Shared/**' - 'AdPlatformServers.sln' - '.gitea/workflows/googleapi.yml' jobs: build-deploy: runs-on: host env: REGISTRY: 10.10.25.211:5000 IMAGE: adplatform/googleapi SERVICE: googleapi steps: - name: Checkout code uses: actions/checkout@v3 - name: Build service run: dotnet build GoogleApi/GoogleApi.csproj --configuration Release - name: Build image run: | podman build \ --layers \ -t ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest \ -f GoogleApi/Dockerfile \ . - name: Push to local registry run: podman push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest - name: Deploy on app server run: | ssh -i ~/.ssh/gitea_runner root@10.10.25.211 \ "podman pull ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest && \ cd /opt/adplatform && \ podman-compose up -d --no-deps --force-recreate ${{ env.SERVICE }}"