-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.16 KB
/
dotnet.yml
File metadata and controls
41 lines (38 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: .NET Core App CI to Docker Hub
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
env:
TZ: Asia/Shanghai
TAG_NUMBER: $GITHUB_RUN_NUMBER
steps:
- uses: actions/checkout@v2
- name: Docker Setup QEMU
uses: docker/setup-qemu-action@v1.2.0
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v1.5.1
- name: Login to Docker Hub
uses: docker/login-action@v1.10.0
with:
Username: ${{ secrets.DOCKER_HUB_USERNAME }}
Password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
# Optionally strip `v` prefix
strip_v: true
- name: Build and push
uses: docker/build-push-action@v2.6.1
with:
context: ./
file: ./src/azure.devops.notify.dingtalk.robots/Dockerfile
platforms: linux/amd64
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/devops.to.dingtalk.robots:latest,${{ secrets.DOCKER_HUB_USERNAME }}/devops.to.dingtalk.robots:${{steps.tag.outputs.tag}}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}