Skip to content

Update main.yml

Update main.yml #11

Workflow file for this run

name: .NET Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet publish /home/runner/work/mldas/mldas/MLDAS.Web/MLDAS.Web.csproj -r linux-x64 /t:PublishContainer -c Release
- name: Tagem
run: docker tag mldas-web:latest us-central1-docker.pkg.dev/${{secrets.GCP_PROJECT_ID}}/mldas-web
- uses: RafikFarhad/push-to-gcr-github-action@v5-rc1
with:
registry: gcr.io
project_id: '${{ secrets.GCP_PROJECT_ID }}'
gcloud_service_key: "${{ secrets.GCP_SERVICE_ACCOUNT_JSON }}"
image_name: mldas-web
push_only: true