mirror of
https://github.com/azure/setup-kubectl.git
synced 2026-12-03 19:51:53 +00:00
feat: add downloadBaseURL, checksum, and downloadAuthToken inputs (closes Azure#206) (#268)
This commit is contained in:
@@ -54,3 +54,32 @@ jobs:
|
||||
|
||||
- name: Validate kubectl setup old version
|
||||
run: python test/validate-kubectl.py 'v1.15.1'
|
||||
|
||||
- name: Fetch known SHA256 for v1.30.0 linux/amd64
|
||||
id: sha
|
||||
run: |
|
||||
value=$(curl -fsSL https://dl.k8s.io/release/v1.30.0/bin/linux/amd64/kubectl.sha256)
|
||||
echo "value=$value" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup kubectl with valid checksum
|
||||
uses: ./
|
||||
with:
|
||||
version: 'v1.30.0'
|
||||
checksum: ${{ steps.sha.outputs.value }}
|
||||
|
||||
- name: Validate kubectl setup with checksum
|
||||
run: python test/validate-kubectl.py 'v1.30.0'
|
||||
|
||||
- name: Setup kubectl with bad checksum (expect failure)
|
||||
id: badsum
|
||||
continue-on-error: true
|
||||
uses: ./
|
||||
with:
|
||||
version: 'v1.29.0'
|
||||
checksum: 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
|
||||
|
||||
- name: Assert bad-checksum step failed
|
||||
if: steps.badsum.outcome != 'failure'
|
||||
run: |
|
||||
echo "Expected bad-checksum step to fail, but outcome was: ${{ steps.badsum.outcome }}"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user