Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2155796

Browse files
authoredJun 19, 2023
Create main.yml
1 parent 69034fc commit 2155796

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
 

‎.github/workflows/main.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: eShop build
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/Services/Coupon/**'
7+
- 'tests/Services/Coupon/**'
8+
branches: [ main ]
9+
10+
jobs:
11+
build-and-push-docker-image:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Get code from the repository
15+
uses: actions/checkout@v1
16+
with:
17+
ref: main
18+
19+
- name: Run unit tests
20+
run: dotnet test tests/Services/Coupon/*.Tests/*.csproj
21+
env:
22+
DOTNET_CLI_TELEMETRY_OPTOUT: true
23+
DOTNET_NOLOGO: true
24+
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@v1.1.0
27+
with:
28+
username: ${{ secrets.REGISTRY_USERNAME }}
29+
password: ${{ secrets.REGISTRY_PASSWORD }}
30+
registry: ${{ secrets.REGISTRY_LOGIN_SERVER }}
31+
path: .
32+
dockerfile: './src/Services/Coupon/Coupon.API/Dockerfile.acr'
33+
repository: 'coupon.api'
34+
tags: 'linux-net6-coupon'
35+
push: true

0 commit comments

Comments
 (0)
Please sign in to comment.