-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.05 KB
/
docker-build-push.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
name: docker-build-push
#https://github.com/marketplace/actions/build-and-push-docker-images
on:
push:
branches:
- master
paths:
- '**/Dockerfile'
jobs:
build-push-docker:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
docker-file: ["Dockerfile"]
module-name: ["base", "dependencies", "archr-schelper"]
steps:
- uses: actions/checkout@v2
- name: Set version and tags
id: ver
run: |
VERSION=`cat containers/VERSION`
echo "version: $VERSION"
echo "::set-output name=version::$(echo $VERSION)"
shell: bash
- name: Build and push image
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: alexthiery/schelper
path: containers/${{matrix.module-name}}
dockerfile: containers/${{matrix.module-name}}/Dockerfile
tags: ${{matrix.module-name}}-${{steps.ver.outputs.version}}