-
Notifications
You must be signed in to change notification settings - Fork 649
66 lines (65 loc) · 1.98 KB
/
_docker.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
workflow_call:
inputs:
runner:
required: true
type: string
arch:
required: true
type: string
docker_distros:
required: true
type: string
dotnet_versions:
required: true
type: string
env:
DOTNET_INSTALL_DIR: "./.dotnet"
DOTNET_ROLL_FORWARD: "Major"
jobs:
docker:
name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }}
runs-on: ${{ inputs.runner }}
strategy:
fail-fast: false
matrix:
docker_distro: ${{ fromJson(inputs.docker_distros) }}
dotnet_version: ${{ fromJson(inputs.dotnet_versions) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Restore State
uses: ./.github/actions/cache-restore
-
uses: actions/download-artifact@v4
name: Download nuget packages
with:
name: nuget
path: ${{ github.workspace }}/artifacts/packages/nuget
-
name: Set up Docker
uses: ./.github/actions/docker-setup
-
name: Docker Test
if: success() && github.event_name == 'pull_request' || github.repository_owner != 'GitTools'
uses: ./.github/actions/docker-test
with:
arch: ${{ inputs.arch }}
docker_distro: ${{ matrix.docker_distro }}
dotnet_version: ${{ matrix.dotnet_version }}
-
name: Docker Publish
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools' && github.ref_name == 'main'
uses: ./.github/actions/docker-publish
with:
arch: ${{ inputs.arch }}
docker_distro: ${{ matrix.docker_distro }}
dotnet_version: ${{ matrix.dotnet_version }}
docker_registry_username: ${{ secrets.DOCKER_USERNAME }}
docker_registry_password: ${{ secrets.DOCKER_PASSWORD }}
github_registry_username: ${{ github.repository_owner }}
github_registry_password: ${{ secrets.DOCKER_GITHUB_TOKEN }}