test: trying building image again. #1
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: Build and Publish Docker Image | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
branches: | |
- tmr | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Extract tag version | |
id: extract_tag | |
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- name: Set lowercase repository owner | |
id: set_lowercase_owner | |
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Copy application.properties | |
run: cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: docker/web-and-data/Dockerfile | |
push: true | |
platforms: linux/amd64 | |
tags: | | |
ghcr.io/${{ env.REPO_OWNER }}/cbioportal-galaxy-button:latest | |
ghcr.io/${{ env.REPO_OWNER }}/cbioportal-galaxy-button:${{ env.TAG_VERSION }} | |
- name: Log out from GitHub Container Registry | |
run: docker logout ghcr.io |