forked from cBioPortal/cbioportal
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 2.34 KB
/
dockerimage.yml
File metadata and controls
61 lines (58 loc) · 2.34 KB
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
55
56
57
58
59
60
61
name: Docker Image CI
on:
push:
branches:
- master
- release-*
- rc
- demo-*
- fusion-sv-migration
- redis-branch-up-to-date
tags: '*'
jobs:
build_and_publish_web_and_data:
if: github.repository == 'cBioPortal/cbioportal'
runs-on: ubuntu-latest
steps:
- name: 'Checkout git repo'
uses: actions/checkout@v1
- name: Extract branch or tag name
# The GITHUB_REF variable is like "refs/head/branch_name" or
# "refs/tag/tag_name". If the tag is prefixed with v, this is a new
# version and we want to push it with the tag "latest" as well because
# that is the version we refer to in the docucmentation. One can give
# the same image multiple tags by using ","
run: echo "##[set-output name=image_tag_names;]$(echo ${GITHUB_REF##*/} | sed 's/^v/latest,/g')"
id: extract_tags
- name: 'Docker build with cache'
uses: whoan/docker-build-with-cache-action@v5
with:
username: "${{ secrets.DOCKER_USERNAME }}"
password: "${{ secrets.DOCKER_PASSWORD }}"
image_name: cbioportal/cbioportal
image_tag: ${{ steps.extract_tags.outputs.image_tag_names }}
context: .
dockerfile: docker/web-and-data/Dockerfile
pull_image_and_stages: false
build_and_publish_web:
if: github.repository == 'cBioPortal/cbioportal'
runs-on: ubuntu-latest
steps:
- name: 'Checkout git repo'
uses: actions/checkout@v1
- name: Extract branch or tag name
# For the web docker image we don't publish it as latest
# just extract branch/tag name and strip v prefix
run: echo "##[set-output name=image_tag_names;]$(echo ${GITHUB_REF##*/} | sed 's/^v//g')"
id: extract_tags
- name: 'Docker build with cache'
uses: whoan/docker-build-with-cache-action@v5
with:
username: "${{ secrets.DOCKER_USERNAME }}"
password: "${{ secrets.DOCKER_PASSWORD }}"
image_name: cbioportal/cbioportal
image_tag: ${{ steps.extract_tags.outputs.image_tag_names }}-web-shenandoah
context: .
dockerfile: docker/web/Dockerfile
pull_image_and_stages: false
# Reference: https://github.com/marketplace/actions/build-docker-images-using-cache