File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 push_to_registry :
88 name : Push Docker image to Docker Hub
99 runs-on : ubuntu-20.04
10+ env :
11+ DOCKER_IMAGE : reactnativecommunity/react-native-android
12+ if : ${{ startsWith(github.ref, 'refs/tags/v*') }}
1013 steps :
1114 - name : Check out the repo
1215 uses : actions/checkout@v2
@@ -20,10 +23,14 @@ jobs:
2023 username : ${{ secrets.DOCKER_USERNAME }}
2124 password : ${{ secrets.DOCKER_PASSWORD }}
2225
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+
2332 - name : Push to Docker Hub
2433 uses : docker/build-push-action@v2
2534 with :
2635 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