Skip to content

Commit 5d68d7d

Browse files
authored
publish image on release (#85)
1 parent a647411 commit 5d68d7d

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed
File renamed without changes.

.github/workflows/build.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Build Docker image
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
paths:
6+
- Dockerfile
7+
pull_request:
8+
paths:
9+
- Dockerfile
410

511
jobs:
612
build:

.github/workflows/publish.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1-
name: Publish Docker image
1+
name: Publish
22
on:
3-
push:
4-
branches:
5-
- master
63
release:
74
types: [published]
85

96
jobs:
107
push_to_registry:
118
name: Push Docker image to Docker Hub
12-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-20.04
1310
steps:
1411
- name: Check out the repo
1512
uses: actions/checkout@v2
16-
- name: Push to Docker Hub
17-
uses: docker/build-push-action@v1
13+
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v1
16+
17+
- name: Login to DockerHub
18+
uses: docker/login-action@v1
1819
with:
1920
username: ${{ secrets.DOCKER_USERNAME }}
2021
password: ${{ secrets.DOCKER_PASSWORD }}
21-
repository: reactnativecommunity/react-native-android
22-
tag_with_ref: true
23-
tags: latest
22+
23+
- name: Push to Docker Hub
24+
uses: docker/build-push-action@v2
25+
with:
26+
push: true
27+
tags: |
28+
reactnativecommunity/react-native-android:latest
29+
reactnativecommunity/react-native-android:${{ GITHUB_REF }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Android Docker Image for react native
2-
[![CircleCI](https://circleci.com/gh/react-native-community/docker-android.svg?style=svg)](https://circleci.com/gh/react-native-community/docker-android)
2+
[![Publish](https://github.com/react-native-community/docker-android/workflows/Publish/badge.svg?event=release)](https://hub.docker.com/r/reactnativecommunity/react-native-android)
33
[![Docker Pulls](https://img.shields.io/docker/pulls/reactnativecommunity/react-native-android.svg?maxAge=3600)](https://hub.docker.com/r/reactnativecommunity/react-native-android)
44
[![Docker Layers](https://images.microbadger.com/badges/image/reactnativecommunity/react-native-android.svg)](https://hub.docker.com/r/reactnativecommunity/react-native-android)
55

0 commit comments

Comments
 (0)