Skip to content

Commit

Permalink
chore: update docker release steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Aug 20, 2021
1 parent c9bb14e commit e99f38f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release-please.yml
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
python-version: "3.7"
- if: ${{ steps.release.outputs.release_created }}
name: Install
run: |
pip3 install -U pip
pip3 install -U pipenv
Expand All @@ -28,15 +29,31 @@ jobs:
pipenv install --dev
pipenv run pip3 install pyyaml -U --force
- if: ${{ steps.release.outputs.release_created }}
name: Build UI assets
run: |
make build-ui
- if: ${{ steps.release.outputs.release_created }}
name: Build package
run: |
rm -rf dist
pipenv run python setup.py sdist bdist_wheel
- if: ${{ steps.release.outputs.release_created }}
name: Upload to PyPi
run: |
pipenv run twine upload dist/grow*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- if: ${{ steps.release.outputs.release_created }}
name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- if: ${{ steps.release.outputs.release_created }}
name: Configure Docker
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
- if: ${{ steps.release.outputs.release_created }}
name: Push to Docker Hub
run: |
pipenv run ./docker_push.sh
1 change: 0 additions & 1 deletion Dockerfile
@@ -1,5 +1,4 @@
FROM ubuntu:focal
MAINTAINER Grow.dev Authors <hello@grow.dev>

ARG grow_version
RUN echo "Grow: $grow_version"
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.main
@@ -1,5 +1,4 @@
FROM ubuntu:focal
MAINTAINER Grow.dev Authors <hello@grow.dev>

RUN echo "Grow: main branch"

Expand Down
11 changes: 8 additions & 3 deletions docker_push.sh
Expand Up @@ -17,13 +17,18 @@ if [ "$1" == "" ]; then
fi

# Ubuntu Base.
docker build --no-cache --build-arg grow_version=$GROW_VERSION \
docker build \
--no-cache \
--build-arg grow_version=$GROW_VERSION \
-t grow/base:$GROW_VERSION -t grow/base:latest \
-t gcr.io/grow-prod/base:$GROW_VERSION -t gcr.io/grow-prod/base:latest \
- < Dockerfile

docker run --rm=true --workdir=/tmp -i grow/base:$GROW_VERSION \
bash -c "git clone https://github.com/grow/grow.dev.git && cd grow.dev/ && grow install && grow build"
docker run \
--rm=true \
--workdir=/tmp \
-i grow/base:$GROW_VERSION \
bash -ec "git clone https://github.com/grow/grow.dev.git && cd grow.dev/ && grow install && grow build"

if [ "$1" == "gcr.io" ] || [ "$1" == "all" ]; then
# Google cloud registry.
Expand Down

0 comments on commit e99f38f

Please sign in to comment.