-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction_raw.yaml
20 lines (20 loc) · 897 Bytes
/
action_raw.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
name: ImageBuilderTool@V2
on: [workflow_dispatch]
jobs:
findDockerFile:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v1
- name: Login to harbor
uses: docker/login-action@v1
with:
registry: harbor.stfc.ac.uk
username: ${{ secrets.HARBOR_USERNAME}}
password: ${{ secrets.HARBOR_TOKEN}}
- name: Build docker images
run: |
for dockerPath in $(find -name Dockerfile); do dockerImageName=$(dirname $dockerPath| xargs basename); docker build . -t harbor.stfc.ac.uk/image-builder-testing/$dockerImageName:latest -f $dockerPath; done
- name: Push docker images
run: |
for dockerPath in $(find -name Dockerfile); do dockerImageName=$(dirname $dockerPath| xargs basename); docker push harbor.stfc.ac.uk/image-builder-testing/$dockerImageName:latest; done