-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.84 KB
/
Copy pathpull_request.yml
File metadata and controls
56 lines (49 loc) · 1.84 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
# Candace Savonen Jan 2025
name: Pull Request
on:
pull_request:
branches: [ main, staging ]
jobs:
dockerfile-check:
name: Test changed Dockerfile - ${{ matrix.config.dir }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {dir: base_ottr, name: 'jhudsl/base_ottr'}
- {dir: base_ottr_r4.4.0, name: 'jhudsl/base_ottr_r4.4.0'}
- {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'}
- {dir: ottrpal, name: 'jhudsl/ottrpal'}
- {dir: ottr_anvil_poll, name: 'jhudsl/anvil-poll-2024'}
- {dir: ottr_datatables, name: 'jhudsl/ottr_datatables'}
- {dir: ottr_website, name: 'jhudsl/ottr_website'}
- {dir: ottr_jupyter, name: 'jhudsl/ottr_jupyter'}
- {dir: ottr_itn_workshop, name: 'jhudsl/ottr_itn_workshop'}
- {dir: ottr_metrics, name: 'jhudsl/ottr_metrics'}
- {dir: ottr_ml, name: 'jhudsl/ottr_ml'}
# NEW IMAGES HERE: #
####### - {dir: directory_path, name: 'name its called on dockerhub'}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get specific changed files
id: image_name
uses: tj-actions/changed-files@v46.0.3
with:
files: ${{ matrix.config.dir }}/*
- run: |
echo ${{ steps.image_name.outputs.any_changed }}
echo ${{ matrix.config.dir }}
- name: Docker build
if: ${{ steps.image_name.outputs.any_changed == 'true'}}
uses: ./.github/workflows/
with:
directory: ${{ matrix.config.dir }}
tag: ${{ matrix.config.name }}
dockerhubpush: false
token: ${{ secrets.GH_PAT }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}