File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,17 +64,12 @@ jobs:
6464 with :
6565 username : ${{ secrets.DOCKERHUB_USERNAME }}
6666 password : ${{ secrets.DOCKERHUB_TOKEN }}
67- - name : Push to Docker Hub for PR
68- if : github.ref != 'refs/heads/main' && github.event_name != 'schedule'
67+ - name : Push to Docker Hub
68+ if : github.event_name != 'schedule'
69+ env :
70+ tag : " ${{ github.ref == 'refs/heads/main' && 'latest' || github.sha }}"
6971 run : |
7072 for c in controller compute-1 compute-2; do
71- docker commit $c bobuhiro11/containerized-devstack-$c:${{ github.sha }}
72- docker push bobuhiro11/containerized-devstack-$c:${{ github.sha }}
73- done
74- - name : Push to Docker Hub for latest
75- if : github.ref == 'refs/heads/main' && github.event_name != 'schedule'
76- run : |
77- for c in controller compute-1 compute-2; do
78- docker commit $c bobuhiro11/containerized-devstack-$c:latest
79- docker push bobuhiro11/containerized-devstack-$c:latest
73+ docker commit $c bobuhiro11/containerized-devstack-$c:$tag
74+ docker push bobuhiro11/containerized-devstack-$c:$tag
8075 done
You can’t perform that action at this time.
0 commit comments