Skip to content

Commit 230af71

Browse files
authored
Merge pull request #3047 from kivy/feature/dockerhub_push
👷 Publish to DockerHub
2 parents 27ead9a + f526e6b commit 230af71

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

Diff for: .github/workflows/docker.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Docker
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- develop
8+
pull_request:
9+
10+
jobs:
11+
docker:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: docker/setup-buildx-action@v3
16+
- run: make docker/build
17+
- run: make docker/login
18+
env:
19+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
20+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
21+
- name: docker push
22+
if: github.ref == 'develop'
23+
run: make docker/push

Diff for: Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ docker/pull:
117117
docker/build:
118118
docker build --cache-from=$(DOCKER_IMAGE) --tag=$(DOCKER_IMAGE) .
119119

120+
docker/login:
121+
@echo $(DOCKERHUB_TOKEN) | docker login --username $(DOCKERHUB_USERNAME) --password-stdin
122+
120123
docker/push:
121124
docker push $(DOCKER_IMAGE)
122125

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ python-for-android is not limited to being used with Buildozer.
4747

4848
[![Unit tests & build apps](https://github.com/kivy/python-for-android/workflows/Unit%20tests%20&%20build%20apps/badge.svg?branch=develop)](https://github.com/kivy/python-for-android/actions?query=workflow%3A%22Unit+tests+%26+build+apps%22)
4949
[![Coverage Status](https://coveralls.io/repos/github/kivy/python-for-android/badge.svg?branch=develop&kill_cache=1)](https://coveralls.io/github/kivy/python-for-android?branch=develop)
50+
[![Docker](https://github.com/kivy/python-for-android/actions/workflows/docker.yml/badge.svg)](https://github.com/kivy/python-for-android/actions/workflows/docker.yml)
5051

5152
## Documentation
5253

0 commit comments

Comments
 (0)