Merge remote-tracking branch 'cbio/master' into dynamic-survival #7
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
name: Docker Build and Push | |
on: | |
push: | |
branches: | |
- test-build # Adjust this branch name as per your requirement | |
- dynamic-survival | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: 'Create application.properties' | |
run: | | |
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# The following two actions are required to build multi-platform images | |
# buildx is an extension of docker build, QUEM is used to convert the binary to varies architecture | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Publish Docker Image on Tag | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/${{ github.repository_owner }}/cbioportal:latest | |
platforms: linux/amd64,linux/arm64 | |
file: docker/web-and-data/Dockerfile | |
cache-from: type=gha | |
cache-to: type=gha | |
# - name: Build the Docker image | |
# run: docker build -f docker/web/Dockerfile -t ghcr.io/${{ github.repository_owner }}/cbioportal:latest . | |
# | |
# - name: Push Docker image to GitHub Container Registry | |
# run: docker push ghcr.io/${{ github.repository_owner }}/cbioportal:latest |