Merge pull request #192 from janog-netcon/update-containerlab #111
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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-controller-manager: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: "projects/907031882243/locations/global/workloadIdentityPools/github/providers/github" | |
| service_account: "[email protected]" | |
| - name: Set up Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Use gcloud CLI | |
| run: gcloud info | |
| - name: Export credentials for Docker | |
| run: gcloud auth configure-docker asia-northeast1-docker.pkg.dev -q | |
| - name: Set up Docker buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push controller-manager | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./cmd/controller-manager/Dockerfile | |
| push: true | |
| tags: | | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-controller-manager:latest | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-controller-manager:master | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-controller-manager:commit-${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| build-gateway: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: "projects/907031882243/locations/global/workloadIdentityPools/github/providers/github" | |
| service_account: "[email protected]" | |
| - name: Set up Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Use gcloud CLI | |
| run: gcloud info | |
| - name: Export credentials for Docker | |
| run: gcloud auth configure-docker asia-northeast1-docker.pkg.dev -q | |
| - name: Set up Docker buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push gateway | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./cmd/gateway/Dockerfile | |
| push: true | |
| tags: | | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-gateway:latest | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-gateway:master | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-gateway:commit-${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| build-nclet: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: "projects/907031882243/locations/global/workloadIdentityPools/github/providers/github" | |
| service_account: "[email protected]" | |
| - name: Set up Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Use gcloud CLI | |
| run: gcloud info | |
| - name: Export credentials for Docker | |
| run: gcloud auth configure-docker asia-northeast1-docker.pkg.dev -q | |
| - name: Set up Docker buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push nclet | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./cmd/nclet/Dockerfile | |
| push: true | |
| tags: | | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-nclet:latest | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-nclet:master | |
| asia-northeast1-docker.pkg.dev/networkcontest/janog55/netcon-pms-nclet:commit-${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| build-kubectl-netcon: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.23 | |
| cache: true | |
| - name: Install dependencies | |
| run: go mod download | |
| - name: Build | |
| run: make kubectl-netcon-build | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kubectl-netcon | |
| path: ./kubectl-netcon |