Skip to content

Commit 425b939

Browse files
author
欧俊
committed
修改一些规则
1 parent 6e508fe commit 425b939

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: .NET Core App CI to Docker Hub
22

33
on:
44
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
5+
tags:
6+
- v*
87

98
jobs:
109
build:
@@ -24,14 +23,19 @@ jobs:
2423
with:
2524
Username: ${{ secrets.DOCKER_HUB_USERNAME }}
2625
Password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
26+
- name: Get tag
27+
id: tag
28+
uses: dawidd6/action-get-tag@v1
29+
with:
30+
# Optionally strip `v` prefix
31+
strip_v: true
2732
- name: Build and push
2833
uses: docker/build-push-action@v2.6.1
2934
with:
3035
context: ./
3136
file: ./src/azure.devops.notify.dingtalk.robots/Dockerfile
3237
platforms: linux/amd64
3338
push: true
34-
tags: |
35-
${{ secrets.DOCKER_HUB_USERNAME }}/devops.to.dingtalk.robots:latest
39+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/devops.to.dingtalk.robots:latest,${{ secrets.DOCKER_HUB_USERNAME }}/devops.to.dingtalk.robots:${{steps.tag.outputs.tag}}
3640
- name: Image digest
3741
run: echo ${{ steps.docker_build.outputs.digest }}

azure.devops.notify.dingtalk.robots.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1212
README.md = README.md
1313
EndProjectSection
1414
EndProject
15+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{4C655A93-BC0A-4410-B7F3-A623BC4039AF}"
16+
EndProject
17+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{193BF571-7BD6-46E7-8D30-A9EE81805A5C}"
18+
ProjectSection(SolutionItems) = preProject
19+
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
20+
EndProjectSection
21+
EndProject
1522
Global
1623
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1724
Debug|Any CPU = Debug|Any CPU
@@ -28,6 +35,7 @@ Global
2835
EndGlobalSection
2936
GlobalSection(NestedProjects) = preSolution
3037
{8691F36B-B4EB-47C0-88DC-AE1238591D02} = {38934095-677B-4C05-8A49-89A437CCA034}
38+
{193BF571-7BD6-46E7-8D30-A9EE81805A5C} = {4C655A93-BC0A-4410-B7F3-A623BC4039AF}
3139
EndGlobalSection
3240
GlobalSection(ExtensibilityGlobals) = postSolution
3341
SolutionGuid = {2261B0C7-3430-4E9A-B821-A93710025097}

0 commit comments

Comments
 (0)