Skip to content

Commit b07bd27

Browse files
committed
(GH-2028) Added docker step for GH Actions
1 parent b38f3cb commit b07bd27

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
1313
ENABLED_MULTI_STAGE_BUILD: true
1414
ENABLED_UNIT_TESTS: true
15+
ENABLED_PUBLISH_DOCKER: true
1516

1617
jobs:
1718
build:
@@ -116,3 +117,41 @@ jobs:
116117
shell: pwsh
117118
run: ./build.ps1 -target Artifacts-Test -DockerDistro ${{ matrix.distro }} -DockerDotnetVersion ${{ matrix.targetFramework }}
118119

120+
docker:
121+
name: Docker
122+
needs: [artifact_test]
123+
runs-on: ubuntu-latest
124+
env:
125+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
126+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
127+
strategy:
128+
matrix:
129+
os: [linux]
130+
targetFramework: [2.1, 3.1]
131+
distro: [centos-7, debian-9, fedora-30, ubuntu-16.04, ubuntu-18.04]
132+
fail-fast: false
133+
134+
steps:
135+
- uses: actions/checkout@v2
136+
- name: Fetch all history for all tags and branches
137+
run: |
138+
git fetch --prune --unshallow
139+
- name: Cache tools
140+
id: cache-tools
141+
uses: actions/cache@v1
142+
with:
143+
path: tools
144+
key: ${{ runner.os }}-tools-${{ hashFiles('build.cake') }}
145+
- name: Cache dotnet
146+
id: cache-dotnet
147+
uses: actions/cache@v1
148+
with:
149+
path: .dotnet
150+
key: ${{ runner.os }}-dotnet-${{ hashFiles('build.config') }}
151+
- uses: actions/download-artifact@v1
152+
with:
153+
name: storage
154+
path: ${{ github.workspace }}/artifacts
155+
- name: '[Docker build & Test]'
156+
shell: pwsh
157+
run: ./build.ps1 -target Publish-DockerHub -DockerDistro ${{ matrix.distro }} -DockerDotnetVersion ${{ matrix.targetFramework }}

0 commit comments

Comments
 (0)