Skip to content

Commit ec0c652

Browse files
authored
Merge pull request #11 from bobuhiro11/dockerhub
Dockerhub
2 parents 4bcc81c + 833ffb6 commit ec0c652

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/action.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,28 @@ jobs:
3636
"source devstack/openrc admin admin; exec nova list"
3737
docker-compose exec -T --user stack controller /bin/bash -c \
3838
"source devstack/openrc admin admin; exec nova list" | grep ACTIVE
39+
docker-compose stop
40+
docker ps -a
41+
- name: Login to Docker Hub
42+
uses: docker/login-action@v2
43+
with:
44+
username: ${{ secrets.DOCKERHUB_USERNAME }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
- name: Push to Docker Hub
47+
if: github.event_name != 'schedule'
48+
run: |
49+
docker commit controller bobuhiro11/containerized-devstack-controller:${{ github.sha }}
50+
docker commit compute-1 bobuhiro11/containerized-devstack-compute-1:${{ github.sha }}
51+
docker commit compute-2 bobuhiro11/containerized-devstack-compute-2:${{ github.sha }}
52+
docker push bobuhiro11/containerized-devstack-controller:${{ github.sha }}
53+
docker push bobuhiro11/containerized-devstack-compute-1:${{ github.sha }}
54+
docker push bobuhiro11/containerized-devstack-compute-2:${{ github.sha }}
55+
- name: Push to Docker Hub for latest
56+
if: github.ref == 'refs/heads/main' && github.event_name != 'schedule'
57+
run: |
58+
docker commit controller bobuhiro11/containerized-devstack-controller:latest
59+
docker commit compute-1 bobuhiro11/containerized-devstack-compute-1:latest
60+
docker commit compute-2 bobuhiro11/containerized-devstack-compute-2:latest
61+
docker push bobuhiro11/containerized-devstack-controller:latest
62+
docker push bobuhiro11/containerized-devstack-compute-1:latest
63+
docker push bobuhiro11/containerized-devstack-compute-2:latest

0 commit comments

Comments
 (0)