-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.6 KB
/
staging.yml
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
42
43
44
45
46
47
name: Staging
on:
push:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Add GitHub Nuget Source
run: dotnet nuget add source https://nuget.pkg.github.com/osmsharp/index.json -n github -u xivk -p ${{secrets.PACKAGES_SECRET }} --store-password-in-clear-text
- name: Install dependencies
run: dotnet restore
- name: Run dotnet format
run: dotnet format --verify-no-changes --verbosity diagnostic --no-restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Publish project
run: dotnet publish -c release
working-directory: ./src/RoutableTiles.API/
- name: Build the Docker image
run: docker build . --file Dockerfile --tag openplannerteam/routeable-tiles-api:staging --tag openplannerteam/routeable-tiles-api:staging-0.$GITHUB_RUN_NUMBER
working-directory: ./src/RoutableTiles.API/
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u openplannerteam --password-stdin
- name: Publish the image.
run: docker push openplannerteam/routeable-tiles-api:staging
working-directory: ./src/RoutableTiles.API/
- name: Publish the image versioned.
run: docker push openplannerteam/routeable-tiles-api:staging-0.$GITHUB_RUN_NUMBER
working-directory: ./src/RoutableTiles.API/