Skip to content

CI: Push docker image to GHCR #8

CI: Push docker image to GHCR

CI: Push docker image to GHCR #8

Workflow file for this run

---
name: Build and Run Docker Image
on:
push:
branches:
- main
jobs:
Builder-Docker-Image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v4
with:
context: builder/ubuntu/
tags: ${{ vars.ODL_BASE_IMAGE_NAME }}:latest
outputs: type=docker,dest=/tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
aaa:
runs-on: ubuntu-latest
needs: Builder-Docker-Image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp
- name: Load image
run: |
docker load --input /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Maven Build
run: |
docker run ${{ vars.ODL_BASE_IMAGE_NAME }}:latest bash -c 'git clone "https://github.com/opendaylight/aaa.git" && cd /aaa && mvn clean install'
yangtools:
runs-on: ubuntu-latest
needs: Builder-Docker-Image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp
- name: Load image
run: |
docker load --input /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Maven Build
run: docker run ${{ vars.ODL_BASE_IMAGE_NAME }}:latest bash -c 'git clone "https://github.com/opendaylight/yangtools.git" && cd /yangtools && mvn clean install'
integration-distribution:
runs-on: ubuntu-latest
needs: Builder-Docker-Image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp
- name: Load image
run: |
docker load --input /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Maven Build
run: docker run ${{ vars.ODL_BASE_IMAGE_NAME }}:latest bash -c 'git clone "https://git.opendaylight.org/gerrit/integration/distribution" && cd /distribution && mvn clean install'
serviceutils:
runs-on: ubuntu-latest
needs: Builder-Docker-Image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp
- name: Load image
run: |
docker load --input /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Maven Build
run: docker run ${{ vars.ODL_BASE_IMAGE_NAME }}:latest bash -c 'git clone "https://github.com/opendaylight/serviceutils.git" && cd /serviceutils && mvn clean install'
odlparent:
runs-on: ubuntu-latest
needs: Builder-Docker-Image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp
- name: Load image
run: |
docker load --input /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Maven Build
run: |
docker run ${{ vars.ODL_BASE_IMAGE_NAME }}:latest bash -c 'git clone "https://github.com/opendaylight/odlparent.git" && cd /odlparent && mvn clean install'
openflowplugin:
runs-on: ubuntu-latest
needs: Builder-Docker-Image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp
- name: Load image
run: |
docker load --input /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Maven Build
run: |
docker run ${{ vars.ODL_BASE_IMAGE_NAME }}:latest bash -c 'git clone "https://github.com/opendaylight/openflowplugin.git" && cd /openflowplugin && mvn clean install'
ovsdb:
runs-on: ubuntu-latest
needs: Builder-Docker-Image
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ vars.ODL_BASE_IMAGE_NAME }}
path: /tmp
- name: Load image
run: |
docker load --input /tmp/${{ vars.ODL_BASE_IMAGE_NAME }}.tar
- name: Maven Build
run: |
docker run ${{ vars.ODL_BASE_IMAGE_NAME }}:latest bash -c 'git clone "https://github.com/opendaylight/ovsdb.git" && cd /ovsdb && mvn clean install'