Skip to content

Commit

Permalink
Merge pull request #11 from oncokb/upgrade-docker-image
Browse files Browse the repository at this point in the history
Update to latest docker actions and build multi-platform images
  • Loading branch information
zhx828 authored Dec 8, 2022
2 parents 1820084 + 3fb74b5 commit ae345ba
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
name: Publish Docker Image on Tag
on:
pull_request:
branches:
- master
release:
types: [published]
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: 'Checkout git repo'
uses: actions/checkout@v1
- name: Build and Push Docker Image on Tag
uses: docker/[email protected]
- name: Checkout
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
oncokb/oncokb-sop
tags: |
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: oncokb/oncokb-sop
push: true
tags: ${{ github.event.release.tag_name:1 }}

- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64,linux/arm64
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit ae345ba

Please sign in to comment.