windows.yml 2.11 KB
Newer Older
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
name: Publish Windows Images

on:
  push:
    branches:
      - master

jobs:
  push_ltsc2019:
    name: Push LTSC2019 Image
    runs-on: windows-2019
    env:
      VERSION: "1.12"
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2
      - name: Login to Dockerhub
        env:
          DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        run: echo "$env:DOCKER_PASSWORD" | docker login -u "$env:DOCKER_USERNAME" --password-stdin
      - name: Pull existing image
        run: docker pull daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019
        continue-on-error: true
      - name: Build image
        run: docker build -t daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 --cache-from daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 $env:VERSION/windowsservercore/ltsc2019/windows-amd64
      - name: Tag images
        run: |
          docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:$env:VERSION-windowsservercore
          docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:windowsservercore-ltsc2019
          docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:windowsservercore
          docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:latest-windowsservercore
          docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:latest
          docker tag daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019 daewokwinamd64/ccl:$env:VERSION
      - name: Push nonbuild image
        run: |
          docker push daewokwinamd64/ccl:$env:VERSION-windowsservercore-ltsc2019
          docker push daewokwinamd64/ccl:windowsservercore-ltsc2019
          docker push daewokwinamd64/ccl:$env:VERSION-windowsservercore
          docker push daewokwinamd64/ccl:windowsservercore
          docker push daewokwinamd64/ccl:latest-windowsservercore
          docker push daewokwinamd64/ccl:latest
          docker push daewokwinamd64/ccl:$env:VERSION