forked from AlexsLemonade/OpenScPCA-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.56 KB
/
docker_doublet-detection.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
55
56
name: Build Docker image for doublet-detection
concurrency:
# only one run per branch at a time
group: "docker_doublet-detection_${{ github.ref }}"
cancel-in-progress: true
on:
pull_request:
branches:
- main
paths:
- analyses/doublet-detection/Dockerfile
- analyses/doublet-detection/.dockerignore
- analyses/doublet-detection/renv.lock
- analyses/doublet-detection/conda-lock.yml
push:
branches:
- main
paths:
- analyses/doublet-detection/Dockerfile
- analyses/doublet-detection/.dockerignore
- analyses/doublet-detection/renv.lock
- analyses/doublet-detection/conda-lock.yml
workflow_dispatch:
inputs:
push-ecr:
description: "Push to AWS ECR"
type: boolean
required: true
jobs:
test-build:
name: Test Build Docker Image
if: github.event_name == 'pull_request' || (contains(github.event_name, 'workflow_') && !inputs.push-ecr)
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:analyses/doublet-detection"
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
build-push:
name: Build and Push Docker Image
if: github.repository_owner == 'AlexsLemonade' && (github.event_name == 'push' || inputs.push-ecr)
uses: ./.github/workflows/build-push-docker-module.yml
with:
module: doublet-detection
push-ecr: true