release-images.yml 3.21 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
name: Release all images

on:
  workflow_dispatch:
    inputs:
      namespace:
        description: "The namespace into which the images are released"
        required: true
        default: daewok

env:
  DOCKER_CLI_EXPERIMENTAL: "enabled"
  IMAGE_NAME: ccl
  IMAGE_BUILD_NAMESPACE: daewok
  IMAGE_TARGET_NAMESPACE: ${{ github.event.inputs.namespace }}
  VERSION: "1.12"

jobs:
  retag_linux:
    name: Retag all -tmp-master suffixes for Linux
    runs-on: ubuntu-20.04
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2
Eric Timmons's avatar
Eric Timmons committed
25
26
        with:
          submodules: true
27
28
29
30
31
32
33
34
35
36
37
38
39
40
      - name: Login to Dockerhub
        env:
          DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
      - name: Retag all -tmp-master suffixes for Linux
        run: ./cl-docker-images-build/cl-docker-images-build pull_retag_and_push_linux_arch_images
  release_linux:
    name: Release Linux images
    runs-on: ubuntu-20.04
    needs: retag_linux
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2
Eric Timmons's avatar
Eric Timmons committed
41
42
        with:
          submodules: true
43
44
45
46
47
48
49
50
51
52
53
54
55
      - name: Login to Dockerhub
        env:
          DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
      - name: Release Linux Images
        run: ./cl-docker-images-build/cl-docker-images-build release_linux_manifests
  release_windows:
    name: Release Windows images
    runs-on: ubuntu-20.04
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2
Eric Timmons's avatar
Eric Timmons committed
56
57
        with:
          submodules: true
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
      - name: Login to Dockerhub
        env:
          DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
      - name: Release Windows Images
        run: |
          create_manifest_for_windows () {
            docker manifest create $IMAGE_TARGET_NAMESPACE/$IMAGE_NAME:$1 ${IMAGE_BUILD_NAMESPACE}winamd64/$IMAGE_NAME:$1
            docker manifest push -p $IMAGE_TARGET_NAMESPACE/$IMAGE_NAME:$1
          }
          create_manifest_for_windows $VERSION-windowsservercore-ltsc2019
          create_manifest_for_windows windowsservercore-ltsc2019
          create_manifest_for_windows $VERSION-windowsservercore
          create_manifest_for_windows windowsservercore
          create_manifest_for_windows latest-windowsservercore

  release_shared:
    name: Release shared tags
    runs-on: ubuntu-20.04
    needs:
      - release_linux
      - release_windows
    steps:
      - name: Check out the repo
        uses: actions/checkout@v2
Eric Timmons's avatar
Eric Timmons committed
84
85
        with:
          submodules: true
86
87
88
89
90
91
92
      - name: Login to Dockerhub
        env:
          DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
          DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
      - name: Release Shared Tags
        run: ./cl-docker-images-build/cl-docker-images-build release_shared_manifests