1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-10-27 06:12:54 +01:00

Create auto-build.yml

Will this work?
This commit is contained in:
GilbN 2021-04-12 00:50:55 +02:00 committed by GitHub
parent 106e83e828
commit 6ee6788af8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

31
.github/workflows/auto-build.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: publishmultipledockerimages
on:
push:
branches: [ docker-mods ]
paths:
- '**/Dockerfile'
jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: get changed files
id: getfile
run: |
echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }}| xargs)"
- name: echo the changed files
run: |
for i in ${{ steps.getfile.outputs.files }}
do
directory="$( echo $i | cut -d'/' -f1 -s )"
if [ -z "$directory" ]; then
continue # Skip root dir
elif [ "$i" == *.md ]; then
continue # Skip markdown files
docker build . --file $i --tag theme.park:$directory
done