-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from oncokb/upgrade-docker-image
Update to latest docker actions and build multi-platform images
- Loading branch information
Showing
1 changed file
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |