File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Build sonic base image
3+ on : workflow_dispatch
4+
5+ env :
6+ REGISTRY : ghcr.io
7+
8+ jobs :
9+ build-mini-lab-sonic-base-image :
10+ name : build mini-lab-sonic base image
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Log in to the container registry
15+ uses : docker/login-action@v3
16+ with :
17+ registry : ${{ env.REGISTRY }}
18+ username : ${{ secrets.DOCKER_REGISTRY_USER }}
19+ password : ${{ secrets.DOCKER_REGISTRY_TOKEN }}
20+
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+
24+ - name : Make tag
25+ run : |
26+ [ "${GITHUB_EVENT_NAME}" == 'workflow_dispatch' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV
27+
28+ - name : Set up Docker Buildx
29+ uses : docker/setup-buildx-action@v3
30+
31+ - name : Build and push mini-lab-sonic container
32+ uses : docker/build-push-action@v6
33+ with :
34+ push : true
35+ sbom : true
36+ file : images/sonic/base/Dockerfile
37+ tags : ${{ env.REGISTRY }}/metal-stack/mini-lab-sonic-base:${{ env.tag }}
You can’t perform that action at this time.
0 commit comments