Remove defaults column from readme #3
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
| # Designed to be used with act, uses kubeconfig from host. | |
| # Run with act -j test-start --container-options "-v /home/user/.kube:/root/.kube -v /home/user/.minikube:/root/.minikube" | |
| name: Test mirrord preview action | |
| on: push | |
| jobs: | |
| test-start: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup kubeconfig | |
| run: | | |
| KUBE_CFG="$HOME/.kube/config" | |
| if [ ! -f "$KUBE_CFG" ]; then | |
| echo "::error::No kubeconfig found at $KUBE_CFG" | |
| exit 1 | |
| fi | |
| echo "Found kubeconfig at $KUBE_CFG" | |
| PATCHED="$HOME/.kube/config-patched" | |
| sed "s|/home/[^/]*/.minikube|$HOME/.minikube|g" "$KUBE_CFG" > "$PATCHED" | |
| echo "KUBECONFIG=$PATCHED" >> "$GITHUB_ENV" | |
| echo "Patched cert paths:" | |
| grep -E 'certificate|client-key' "$PATCHED" || true | |
| - name: Start preview | |
| id: preview | |
| uses: ./ | |
| with: | |
| action: start | |
| target: deployment/echoserver | |
| namespace: echoserver | |
| mode: steal | |
| filter: 'x-preview-id: test-123' | |
| # ports: '[80, 8080]' | |
| # ttl_mins: '30' | |
| key: 'test-key-123' | |
| image: "byjg/static-httpserver" | |
| # For testing mostly, or using non-latest cli version. | |
| # cli_path: /mirrord/target/debug/mirrord | |
| - name: Print session key | |
| run: echo "Session key = ${{ steps.preview.outputs.session-key }}" | |
| test-stop: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup kubeconfig | |
| run: | | |
| KUBE_CFG="$HOME/.kube/config" | |
| if [ ! -f "$KUBE_CFG" ]; then | |
| echo "::error::No kubeconfig found at $KUBE_CFG" | |
| exit 1 | |
| fi | |
| PATCHED="$HOME/.kube/config-patched" | |
| sed "s|/home/[^/]*/.minikube|$HOME/.minikube|g" "$KUBE_CFG" > "$PATCHED" | |
| echo "KUBECONFIG=$PATCHED" >> "$GITHUB_ENV" | |
| - name: Stop preview | |
| uses: ./ | |
| with: | |
| action: stop | |
| key: 'test-key-123' |