From 8585f879f3df29153d3a8d615f165ce051ba8646 Mon Sep 17 00:00:00 2001 From: Sunny Date: Mon, 19 Oct 2020 00:52:24 +0530 Subject: [PATCH] Add OS image release workflow This workflow can be used to build all the OS images in parallel and publish them together. --- .github/workflows/release-os-images.yml | 130 ++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 .github/workflows/release-os-images.yml diff --git a/.github/workflows/release-os-images.yml b/.github/workflows/release-os-images.yml new file mode 100644 index 000000000..2244892bd --- /dev/null +++ b/.github/workflows/release-os-images.yml @@ -0,0 +1,130 @@ +name: Release OS images + +on: + workflow_dispatch: + # Enable manual trigger of this action. + inputs: + user: + description: Container registry user. + default: weaveworks + required: true + +env: + DOCKER_USER: ${{ github.event.inputs.user }} + +jobs: + ubuntu: + runs-on: ubuntu-latest + env: + WHAT: ubuntu + RELEASE: latest + steps: + - uses: actions/checkout@v2 + - name: Login to container registry + uses: docker/login-action@v1 + with: + registry: docker.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + - name: Build amd64 image + env: + GOARCH: amd64 + run: cd images && make build && make push + - name: Build arm64 image + env: + GOARCH: arm64 + run: cd images && make build && make push + - name: Update manifest list + env: + IS_MANIFEST_LIST: 1 + run: cd images && make push + + centos: + runs-on: ubuntu-latest + env: + WHAT: centos + RELEASE: 8 + steps: + - uses: actions/checkout@v2 + - name: Login to container registry + uses: docker/login-action@v1 + with: + registry: docker.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + - name: Build image + run: cd images && make build && make push + + amazonlinux: + runs-on: ubuntu-latest + env: + WHAT: amazonlinux + RELEASE: 2 + steps: + - uses: actions/checkout@v2 + - name: Login to container registry + uses: docker/login-action@v1 + with: + registry: docker.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + - name: Build image + run: cd images && make build && make push + + opensuse: + runs-on: ubuntu-latest + env: + WHAT: opensuse + RELEASE: tumbleweed + steps: + - uses: actions/checkout@v2 + - name: Login to container registry + uses: docker/login-action@v1 + with: + registry: docker.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + - name: Build image + run: cd images && make build && make push + + kubeadm: + runs-on: ubuntu-latest + env: + WHAT: kubeadm + RELEASE: latest + steps: + - uses: actions/checkout@v2 + - name: Login to container registry + uses: docker/login-action@v1 + with: + registry: docker.io + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + - name: Build amd64 image + env: + GOARCH: amd64 + run: cd images && make build && make push + - name: Build arm64 image + env: + GOARCH: arm64 + run: cd images && make build && make push + - name: Update manifest list + env: + IS_MANIFEST_LIST: 1 + run: cd images && make push + + # aline: + # runs-on: ubuntu-latest + # env: + # WHAT: alpine + # RELEASE: latest + # steps: + # - uses: actions/checkout@v2 + # - name: Login to container registry + # uses: docker/login-action@v1 + # with: + # registry: docker.io + # username: ${{ secrets.CR_USER }} + # password: ${{ secrets.CR_PAT }} + # - name: Build image + # run: cd images && make build