Build sonic base image #4
Workflow file for this run
This file contains hidden or 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: Build sonic base image | |
| on: workflow_dispatch | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build-mini-lab-sonic-base-image: | |
| name: build mini-lab-sonic base image | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| versions: | |
| - name: 202311 | |
| - name: 202411 | |
| - name: 202505 | |
| steps: | |
| - name: Log in to the container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ secrets.DOCKER_REGISTRY_USER }} | |
| password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push mini-lab-sonic-base container | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| sbom: true | |
| file: images/sonic/base-${{ matrix.versions.name }}/Dockerfile | |
| tags: ${{ env.REGISTRY }}/metal-stack/mini-lab-sonic-base:${{ matrix.versions.name }} |