-
Notifications
You must be signed in to change notification settings - Fork 12
28 lines (20 loc) · 1.03 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Docker Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build the Docker image
uses: actions/checkout@v2
- name: Run docker build
run: docker build . --file Dockerfile --tag oneprocloud/cloud-discovery-prophet:latest
- name: Tag Aliyun
run: docker tag oneprocloud/cloud-discovery-prophet:latest registry.cn-beijing.aliyuncs.com/oneprocloud-opensource/cloud-discovery-prophet:latest
- name: Login dockerhub
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to dockerhub
run: docker push oneprocloud/cloud-discovery-prophet:latest
- name: Login Aliyun dockerhub
run: docker login -u ${{ secrets.ALIYUN_DOCKERHUB_USERNAME }} -p ${{ secrets.ALIYUN_DOCKERHUB_PASSWORD }} registry.cn-beijing.aliyuncs.com
- name: Push to aliyun dockerhub
run: docker push registry.cn-beijing.aliyuncs.com/oneprocloud-opensource/cloud-discovery-prophet:latest