Skip to content

Commit

Permalink
Merge pull request #163 from ursais/fix-actions
Browse files Browse the repository at this point in the history
[FIX] github actions build
  • Loading branch information
JevinD authored Nov 9, 2021
2 parents 2f41e5e + 20a564f commit 5121095
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
cd $(dirname $image)
docker build . --file Dockerfile --no-cache
echo "Build of $image completed!"
! docker system prune -a -f
cd $OLD_PWD
done
Expand All @@ -39,6 +40,7 @@ jobs:
echo "Building $image..."
cd $(dirname $image)
docker build . --file Dockerfile --no-cache
! docker system prune -a -f
echo "Build of $image completed!"
cd $OLD_PWD
done
Expand All @@ -61,28 +63,32 @@ jobs:
run: |
OLD_PWD=$(pwd)
for image in `find $OS -name Dockerfile | sort -r`; do
echo $image
echo "Building $image..."
DIR=$(dirname $image)
IMAGE_ID=$(echo $DIR | sed -e 's/^\.\///g' -e 's/\//-/g')
cd $DIR
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[ "$VERSION" == "master" ] && VERSION=latest
docker build . --file Dockerfile --tag $ORG/$IMAGE_ID:$VERSION --no-cache
echo "Build of $image completed!"
docker push $ORG/$IMAGE_ID:$VERSION
! docker system prune -a -f
cd $OLD_PWD
done
- name: Build and push Apps
run: |
OLD_PWD=$(pwd)
for image in `find $APPS -name Dockerfile | sort -r`; do
echo $image
echo "Building $image..."
DIR=$(dirname $image)
IMAGE_ID=$(echo $DIR | sed -e 's/^\.\///g' -e 's/\//-/g')
cd $DIR
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[ "$VERSION" == "master" ] && VERSION=latest
docker build . --file Dockerfile --tag $ORG/$IMAGE_ID:$VERSION --no-cache
echo "Build of $image completed!"
docker push $ORG/$IMAGE_ID:$VERSION
! docker system prune -a -f
cd $OLD_PWD
done

0 comments on commit 5121095

Please sign in to comment.