style: reword when bootstrap config does not exist #22
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: Release controlplane | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
paths: | |
- "go.mod" | |
- "**.go" | |
- ".github/workflows/controlplane.yaml" | |
- "packaging/controlplane/**" | |
env: | |
REGISTRY: europe-north1-docker.pkg.dev/nais-io/nais/images | |
jobs: | |
test: | |
strategy: | |
matrix: | |
mise_task: | |
- check:govulncheck | |
- check:staticcheck | |
- check:govet | |
- ci:fmt | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: jdx/mise-action@v3 | |
with: | |
cache: false | |
- run: mise run ${{ matrix.mise_task }} | |
build_debs: | |
name: Build debs | |
needs: | |
- test | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: jdx/mise-action@v3 | |
- name: "Build controlplane" | |
run: | | |
export VERSION="$(date "+%Y-%m-%d-%H%M%S")" | |
mise run package:controlplane-debs | |
- uses: google-github-actions/setup-gcloud@v3 | |
- name: "Auth with Google" | |
uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: "${{ secrets.GOOGLE_DEB_UPLOAD_SA_JSON }}" | |
- name: "Upload controlplane deb files to repository" | |
run: | | |
gcloud artifacts apt upload controlplane --source apiserver.deb --location europe-north1 --quiet | |
gcloud artifacts apt upload controlplane --source gateway-agent.deb --location europe-north1 --quiet | |
gcloud artifacts apt upload controlplane --source prometheus-agent.deb --location europe-north1 --quiet | |
build_enroller: | |
name: Build enroller | |
needs: | |
- test | |
permissions: | |
contents: "read" | |
id-token: "write" | |
packages: read | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: google-github-actions/setup-gcloud@v3 | |
- id: "auth" | |
name: "Authenticate to Google Cloud" | |
uses: "google-github-actions/auth@v2" | |
with: | |
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }} | |
service_account: "[email protected]" | |
token_format: "access_token" | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: "oauth2accesstoken" | |
password: "${{ steps.auth.outputs.access_token }}" | |
- name: Docker meta enroller | |
id: metadata | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/naisdevice-enroller | |
# Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern=v{{version}} | |
type=semver,pattern=v{{major}}.{{minor}} | |
type=semver,pattern=v{{major}} | |
type=sha | |
- name: Build and push enroller | |
uses: docker/build-push-action@v6 | |
env: | |
cache_ref: ${{ env.REGISTRY }}/naisdevice-enroller:main | |
with: | |
context: . | |
file: cmd/enroller/Dockerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
cache-from: type=registry,ref=${{ env.cache_ref }} | |
cache-to: type=registry,ref=${{ env.cache_ref }},mode=max | |
build_auth_server: | |
name: Build auth-server | |
needs: | |
- test | |
permissions: | |
contents: "read" | |
id-token: "write" | |
packages: read | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v5 | |
- id: "auth" | |
name: "Authenticate to Google Cloud" | |
uses: "google-github-actions/auth@v2" | |
with: | |
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }} | |
service_account: "[email protected]" | |
token_format: "access_token" | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: "oauth2accesstoken" | |
password: "${{ steps.auth.outputs.access_token }}" | |
- name: Docker meta auth-server | |
id: metadata | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/naisdevice-auth-server | |
# Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern=v{{version}} | |
type=semver,pattern=v{{major}}.{{minor}} | |
type=semver,pattern=v{{major}} | |
type=sha | |
- name: Build and push auth-server | |
uses: docker/build-push-action@v6 | |
env: | |
cache_ref: ${{ env.REGISTRY }}/naisdevice-auth-server:main | |
with: | |
context: . | |
file: cmd/auth-server/Dockerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
cache-from: type=registry,ref=${{ env.cache_ref }} | |
cache-to: type=gha,ref=${{ env.cache_ref }},mode=max |