Merge pull request #142 from janog-netcon/fix-redirect-location #81
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: Build and Push image to gcr.io | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-push-to-gcr-api: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: "projects/907031882243/locations/global/workloadIdentityPools/github/providers/github" | |
service_account: "github-actions-score-server-ci@networkcontest.iam.gserviceaccount.com" | |
- 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 API container | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./api | |
file: ./api/Dockerfile | |
push: true | |
tags: | | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-api:latest | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-api:master | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-api:commit-${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-and-push-to-gcr-ui: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: "projects/907031882243/locations/global/workloadIdentityPools/github/providers/github" | |
service_account: "github-actions-score-server-ci@networkcontest.iam.gserviceaccount.com" | |
- 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 UI container | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./ui | |
file: ./ui/Dockerfile | |
push: true | |
tags: | | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-ui:latest | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-ui:master | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-ui:commit-${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-and-push-to-gcr-vmdb-api: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: "projects/907031882243/locations/global/workloadIdentityPools/github/providers/github" | |
service_account: "github-actions-score-server-ci@networkcontest.iam.gserviceaccount.com" | |
- 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 vmdb-api container | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./vmdb-api | |
file: ./vmdb-api/Dockerfile | |
push: true | |
tags: | | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-vmdb-api:latest | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-vmdb-api:master | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-vmdb-api:commit-${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
build-and-push-to-gcr-exporter: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: "projects/907031882243/locations/global/workloadIdentityPools/github/providers/github" | |
service_account: "github-actions-score-server-ci@networkcontest.iam.gserviceaccount.com" | |
- 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 exporter container | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./exporter | |
file: ./exporter/Dockerfile | |
push: true | |
tags: | | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-exporter:latest | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-exporter:master | |
asia-northeast1-docker.pkg.dev/networkcontest/janog55/network-score-server-exporter:commit-${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |