Skip to content

Commit

Permalink
Release docker image for arm64 (#75)
Browse files Browse the repository at this point in the history
* Release docker image for arm64

Signed-off-by: odidev <[email protected]>

* Update publish CI

- Only publish for non-pull-requests
- Require test to pass explicitly
- Generate tags and labels from non-official Docker action
- Make use of cache for build speed

Co-authored-by: Dylan Arbour <[email protected]>
  • Loading branch information
odidev and arbourd authored Feb 13, 2021
1 parent db4dab1 commit 4c6fce9
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- main
tags:
- v*

jobs:
test:
Expand Down Expand Up @@ -32,3 +34,33 @@ jobs:
-e "BUILD_NAME=$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER"
concourse-slack-alert-resource:$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER
/opt/resource/out $PWD
publish:
needs: [test, docker-test]
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-qemu-action@v1
- uses: docker/login-action@v1
with:
registry: docker.io
username: arbourd
password: ${{ secrets.DOCKER_TOKEN }}

- uses: crazy-max/ghaction-docker-meta@v1
id: docker_meta
with:
images: docker.io/arbourd/concourse-slack-alert-resource
tag-match: v(.*)

- name: build and publish image
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=docker.io/arbourd/concourse-slack-alert-resource:latest
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

0 comments on commit 4c6fce9

Please sign in to comment.