File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 7
7
push_to_registry :
8
8
name : Push Docker image to Docker Hub
9
9
runs-on : ubuntu-20.04
10
+ env :
11
+ DOCKER_IMAGE : reactnativecommunity/react-native-android
12
+ if : ${{ startsWith(github.ref, 'refs/tags/v*') }}
10
13
steps :
11
14
- name : Check out the repo
12
15
uses : actions/checkout@v2
@@ -20,10 +23,14 @@ jobs:
20
23
username : ${{ secrets.DOCKER_USERNAME }}
21
24
password : ${{ secrets.DOCKER_PASSWORD }}
22
25
26
+ - name : Prepare tags
27
+ id : tags
28
+ run : |
29
+ VERSION=${GITHUB_REF#refs/tags/v}
30
+ echo ::set-output name=tags::"${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest"
31
+
23
32
- name : Push to Docker Hub
24
33
uses : docker/build-push-action@v2
25
34
with :
26
35
push : true
27
- tags : |
28
- reactnativecommunity/react-native-android:latest
29
- reactnativecommunity/react-native-android:${{ GITHUB_REF }}
36
+ tags : ${{ steps.tags.outputs.tags }}
You can’t perform that action at this time.
0 commit comments