ACE -> KubeDB Platform #349
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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - "*" | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| label-detector: | |
| name: Runner Label | |
| runs-on: label-detector | |
| outputs: | |
| runs-on: ${{ steps.detector.outputs.label }} | |
| steps: | |
| - name: Detect Label | |
| id: detector | |
| run: | | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs | |
| echo "label=$(curl -fsSL https://this-is-nats.appscode.ninja/runs-on/${{ github.repository_owner }}?visibility=${{ github.repository_visibility }})" >> $GITHUB_OUTPUT | |
| build: | |
| name: Build | |
| needs: label-detector | |
| runs-on: "${{ needs.label-detector.outputs.runs-on }}" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install kubectl | |
| run: | | |
| curl -LO https://dl.k8s.io/release/v1.32.1/bin/linux/amd64/kubectl | |
| chmod +x ./kubectl | |
| sudo mv ./kubectl /usr/local/bin/kubectl | |
| - name: Install link checker | |
| run: | | |
| curl -fsSL -o liche https://github.com/appscodelabs/liche/releases/download/v0.1.0/liche-linux-amd64 | |
| chmod +x liche | |
| sudo mv liche /usr/local/bin/liche | |
| - name: Create Kubernetes cluster | |
| id: kind | |
| uses: engineerd/setup-kind@v0.5.0 | |
| with: | |
| version: v0.31.0 | |
| - name: Prepare cluster for testing | |
| id: local-path | |
| run: | | |
| echo "waiting for nodes to be ready ..." | |
| kubectl wait --for=condition=Ready nodes --all --timeout=5m | |
| kubectl get nodes | |
| echo | |
| echo "install helm 3" | |
| curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
| - name: Check links | |
| run: | | |
| liche -r docs -d $(pwd) -c 10 -p -h -l -x '^(.*golang.org.*|.*github.com.*|.*api.slack.com.*|.*twitter.com.*|.*linode.com.*|.*helm.sh.*|.*k8s.io.*|.*percona.com.*|.*kubernetes.io.*|.*search-guard.com.*|.*hub.docker.com.*|.*appscode.com.*|.*mongodb.com.*|.*community.arm.com.*|.*cluster.com.*|.*proxysql.com.*|.*postgresql.org.*|.*kafka.com.*|.*stackoverflow.com.*|.*redis.io.*|.*elastic.co.*|.*mysql.*|.*developer.hashicorp.com.*|.*pgpool.net.*|.*clickhouse.com.*)$' | |
| max_retries=5 | |
| retry_count=0 | |
| while [ $retry_count -lt $max_retries ]; do | |
| if liche -r docs -d $(pwd) -c 10 -p -h -l -x '^(.*golang.org.*|.*github.com.*|.*api.slack.com.*|.*twitter.com.*|.*linode.com.*|.*helm.sh.*|.*k8s.io.*|.*percona.com.*|.*kubernetes.io.*|.*search-guard.com.*|.*hub.docker.com.*|.*appscode.com.*|.*mongodb.com.*|.*community.arm.com.*|.*cluster.com.*|.*proxysql.com.*|.*postgresql.org.*|.*kafka.com.*|.*stackoverflow.com.*|.*redis.io.*|.*elastic.co.*|.*mysql.*|.*developer.hashicorp.com.*|.*pgpool.net.*|.*clickhouse.com.*)$'; then | |
| echo "Link check passed" | |
| exit 0 | |
| fi | |
| retry_count=$((retry_count + 1)) | |
| if [ $retry_count -lt $max_retries ]; then | |
| echo "Link check failed, retrying... (attempt $((retry_count + 1))/$max_retries)" | |
| sleep 5 | |
| fi | |
| done | |
| echo "Link check failed after $max_retries attempts" | |
| exit 1 |