File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Curl port-forwarded service
2+ description : Port-forward a service and curl it with retries
3+ inputs :
4+ service :
5+ description : Kubernetes service name
6+ required : true
7+ port :
8+ description : Service port to forward
9+ required : true
10+ local-port :
11+ description : Local port for port-forward
12+ required : false
13+ default : " 18080"
14+ runs :
15+ using : composite
16+ steps :
17+ - name : curl service
18+ shell : bash
19+ run : |
20+ kubectl get svc
21+ echo 'Starting port-forward'
22+ kubectl port-forward "svc/${{ inputs.service }}" "${{ inputs.local-port }}:${{ inputs.port }}" > /dev/null 2>&1 & pfPID=$!
23+ trap 'kill $pfPID' EXIT
24+ echo 'Curling service endpoint with retries'
25+ for i in {1..20}; do
26+ if curl -m 3 "http://127.0.0.1:${{ inputs.local-port }}"; then
27+ exit 0
28+ fi
29+ sleep 3
30+ done
31+ exit 1
Original file line number Diff line number Diff line change 1+ name : Setup kind registry
2+ description : Create kind cluster with local registry and wait for it
3+ inputs :
4+ registry-port :
5+ description : Local registry port
6+ required : false
7+ default : " 5000"
8+ outputs :
9+ local-registry :
10+ description : Local registry address from kind
11+ value : ${{ steps.kind.outputs.LOCAL_REGISTRY }}
12+ runs :
13+ using : composite
14+ steps :
15+ - name : start kind
16+ id : kind
17+ uses : helm/kind-action@v1.13.0
18+ with :
19+ registry : true
20+ registry_name : kind-registry
21+ registry_port : ${{ inputs.registry-port }}
22+ - name : wait for registry
23+ shell : bash
24+ run : |
25+ for i in {1..20}; do
26+ if curl -sSf "http://${{ steps.kind.outputs.LOCAL_REGISTRY }}/v2/" > /dev/null; then
27+ exit 0
28+ fi
29+ sleep 2
30+ done
31+ curl -sS "http://${{ steps.kind.outputs.LOCAL_REGISTRY }}/v2/" || true
32+ exit 1
Original file line number Diff line number Diff line change 1414 uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
1515 with :
1616 go-version : ' 1.25'
17+ cache : true
1718 - name : make
1819 run : make
1920 - uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
3536 uses : actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
3637 with :
3738 go-version : ' 1.25'
39+ cache : true
3840 - name : make
3941 run : make
4042 - uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
You can’t perform that action at this time.
0 commit comments