update actions yaml
This commit is contained in:
1 parent
831165147f
commit
8a48123dd7
8 files changed
+158
No files matched your search
@@ -0,0 +1,39 @@
|
||||
name: dotnet-publish-nuget
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: 8.x
|
||||
DOTNET_NUGET_SOURCE_URL: https://git.mworkspace.cn/api/packages/GiteaActionsSample/nuget/index.json
|
||||
jobs:
|
||||
Pack-And-Publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: List files in the repos
|
||||
run: ls ${{ gitea.workspace }} && ls $GITEA_WORKSPACE
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
cache: true
|
||||
source-url: ${{ env.DOTNET_NUGET_SOURCE_URL }}
|
||||
env:
|
||||
NUGET_AUTH_TOKEN: ${{secrets.NUGET_APIKEY}}
|
||||
- name: Install dependencies
|
||||
run: dotnet restore -s https://api.nuget.org/v3/index.json
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore -o dst
|
||||
- name: Test
|
||||
run: dotnet test --no-restore --verbosity normal
|
||||
- name: Login to Aliyun Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: registry.cn-guangzhou.aliyuncs.com
|
||||
username: ${{ secrets.DOCKERHUB_NROP_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_NROP_PASSWORD }}
|
||||
- name: Build docker image and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: [acme_nrop/dotnet-deploy-k8s:latest, acme_nrop/dotnet-deploy-k8s:${{ gitea.sha }}]
|
||||
Reference in new issue
Block a user