Skip to content

Commit

Permalink
Split release actions to 2 separate workflows
Browse files Browse the repository at this point in the history
Since the ARM container build can fail indeterministically, it
seems wise to split up the build so that we can retry container
build without having to build release.

Signed-off-by: Imran M Yousuf <imyousuf@gmail.com>
  • Loading branch information
imyousuf committed Mar 30, 2021
1 parent b8f8b10 commit f7fcd51
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 55 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release-containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Webhook Broker Release Containers

on:
push:
tags:
- 'v*'

jobs:
docker_containers:
name: Docker Container Release

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

-
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all

-
name: Available platforms
run: echo ${{ steps.qemu.outputs.platforms }}

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

-
uses: docker/login-action@v1
name: Login to DockerHub
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
uses: docker/login-action@v1
name: Login to Github Docker Registry
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

-
uses: docker/build-push-action@v2
name: Push
id: build_push
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
imyousuf/webhook-broker:${{ steps.get_version.outputs.VERSION }}
ghcr.io/imyousuf/webhook-broker:${{ steps.get_version.outputs.VERSION }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Webhook Broker Release
name: Webhook Broker Release Packages

on:
push:
Expand Down Expand Up @@ -48,60 +48,6 @@ jobs:
release_id: ${{ steps.create_release.outputs.id }}
assets_path: dist/webhook-broker-*.tar.bz2

docker_containers:
name: Docker Container Release

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

-
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all

-
name: Available platforms
run: echo ${{ steps.qemu.outputs.platforms }}

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

-
uses: docker/login-action@v1
name: Login to DockerHub
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
uses: docker/login-action@v1
name: Login to Github Docker Registry
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

-
uses: docker/build-push-action@v2
name: Push
id: build_push
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
imyousuf/webhook-broker:${{ steps.get_version.outputs.VERSION }}
ghcr.io/imyousuf/webhook-broker:${{ steps.get_version.outputs.VERSION }}
helm_chart:
name: Helm Chart Release

Expand Down

0 comments on commit f7fcd51

Please sign in to comment.