Skip to content

Update action.yaml

Update action.yaml #10

---
name: ODL Docker Image - Build and Push them to Docker registry
on:
push:
branches:
- '*'
workflow_dispatch:
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 }}