forked from nf-core/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.68 KB
/
push_dockerhub_release.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
name: nf-core Docker push (release)
# This builds the docker image and pushes it to DockerHub
# Runs on nf-core repo releases and push event to 'dev' branch (PR merges)
on:
release:
types: [published]
# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub (release)
runs-on: ubuntu-latest
# Only run for the nf-core repo, for releases and merged PRs
if: ${{ github.repository == 'nf-core/tools' }}
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
strategy:
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Build nfcore/tools:latest docker image
run: docker build --no-cache . -t nfcore/tools:latest
- name: Build nfcore/gitpod:latest docker image
run: docker build --no-cache . --file nf_core/gitpod/gitpod.Dockerfile -t nfcore/gitpod:latest
- name: Push Docker images to DockerHub (release)
run: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push nfcore/tools:latest
docker tag nfcore/tools:latest nfcore/tools:${{ github.event.release.tag_name }}
docker push nfcore/tools:${{ github.event.release.tag_name }}
docker push nfcore/gitpod:latest
docker tag nfcore/gitpod:latest nfcore/gitpod:${{ github.event.release.tag_name }}
docker push nfcore/gitpod:${{ github.event.release.tag_name }}