From 9fccc990be7bfef42fab3078ee02744f239b0c23 Mon Sep 17 00:00:00 2001 From: Zach White Date: Wed, 7 Jul 2021 22:54:34 -0700 Subject: [PATCH] Add infrastructure to build and push docker containers (#64) * add infrastructure to build and push docker containers * make it part of the deploy workflow --- .github/workflows/python-publish.yml | 12 +++++++++++- Dockerfile | 8 ++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b8bd042..fa3ba75 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -42,8 +42,18 @@ jobs: tags: true - name: Build and publish env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_USERNAME: qmk TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python setup.py sdist bdist_wheel twine upload dist/* + - name: Log in to Docker Hub + uses: docker/login-action@v1.10.0 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Build and Push to Docker Hub + uses: docker/build-push-action@v2.5.0 + with: + push: true + tags: qmkfm/qmk_cli:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5b5a7e1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM qmkfm/base_container + +# Install python packages +RUN python3 -m pip install --upgrade pip setuptools wheel +RUN python3 -m pip install --upgrade nose2 qmk + +# Set the default location for qmk_firmware +ENV QMK_HOME /qmk_firmware