-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 1.48 KB
/
push_cont_ghcr_ratioconv.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
name: Docker push of rtaratioconv to GHCR
# This builds the docker image and pushes it to GHCR
# Runs on qbic-pipelines repo releases and push event to 'dev' branch (PR merges)
on:
push:
branches:
- dev
release:
types: [published]
jobs:
push_github:
name: Push new rtaratioconv image to GHCR
runs-on: ubuntu-latest
# Only run for the qbic-pipelines repo, for releases and merged PRs
if: ${{ github.repository == 'qbic-pipelines/root-tissue-analysis' }}
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
- name: Build new docker image
run: docker build --no-cache ./modules/local/ratioconv/ -t ghcr.io/qbic-pipelines/rtaratioconv:latest
- name: Log in to registry
# Update the personal access token to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Push image to GHCR (dev)
if: ${{ github.event_name == 'push' }}
run: |
docker tag ghcr.io/qbic-pipelines/rtaratioconv:latest ghcr.io/qbic-pipelines/rtaratioconv:dev
docker push ghcr.io/qbic-pipelines/rtaratioconv:dev
- name: Push image to GHCR (release)
if: ${{ github.event_name == 'release' }}
run: |
docker tag ghcr.io/qbic-pipelines/rtaratioconv:latest ghcr.io/qbic-pipelines/rtaratioconv:${{ github.event.release.tag_name }}
docker push ghcr.io/qbic-pipelines/rtaratioconv:${{ github.event.release.tag_name }}