forked from cBioPortal/cbioportal
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.43 KB
/
docker-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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