Merge pull request #12 from ayushishu/main #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 }} | |