-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (25 loc) · 1.25 KB
/
odl-docker-image.yaml
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
29
30
31
32
---
name: ODL Docker Image - Build and Push them to Docker registry
on:
push:
branches:
- '*'
jobs:
builder-docker-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build centos Docker image
run: docker build --build-arg="BASE_IMAGE=centos" --build-arg="KARAF_VERSION=0.18.1" -t ${{ vars.DOCKER_REPOSITORY }}/${{ vars.ODL_IMAGE_NAME_CENTOS }} opendaylight-docker-image
- name: Build ubuntu Docker image
run: docker build --build-arg="KARAF_VERSION=0.18.1" -t ${{ vars.DOCKER_REPOSITORY }}/${{ vars.ODL_IMAGE_NAME_UBUNTU }} opendaylight-docker-image
- name: Authenticate to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push ODL-Centos Base Docker image
run: docker push ${{ vars.DOCKER_REPOSITORY }}/${{ vars.ODL_IMAGE_NAME_CENTOS }}
- name: Push ODL-Ubuntu Base Docker image
run: docker push ${{ vars.DOCKER_REPOSITORY }}/${{ vars.ODL_IMAGE_NAME_UBUNTU }}