Skip to content

Commit 7e8d1a9

Browse files
committed
Add Action to publish to Docker Hub
1 parent 65fa87a commit 7e8d1a9

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

Diff for: .github/workflows/docker-image.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
docker:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: Docker meta
16+
id: meta
17+
uses: docker/metadata-action@v4
18+
with:
19+
images: |
20+
jangrewe/gitlab-ci-android
21+
tags: |
22+
type=ref,event=branch
23+
type=ref,event=tag
24+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
25+
flavor: latest=true
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v2
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v2
30+
- name: Login to DockerHub
31+
if: github.event_name != 'pull_request'
32+
uses: docker/login-action@v2
33+
with:
34+
username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
36+
- name: Build and push
37+
uses: docker/build-push-action@v3
38+
with:
39+
context: .
40+
push: ${{ github.event_name != 'pull_request' }}
41+
tags: ${{ steps.meta.outputs.tags }}
42+
labels: ${{ steps.meta.outputs.labels }}

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:20.04
22
MAINTAINER Jan Grewe <jan@faked.org>
33

4-
ENV VERSION_TOOLS "7583922"
4+
ENV VERSION_TOOLS "8512546"
55

66
ENV ANDROID_SDK_ROOT "/sdk"
77
# Keep alias for compatibility

0 commit comments

Comments
 (0)