mirror of
https://github.com/Azure/setup-kubectl.git
synced 2026-05-22 17:02:04 +00:00
feat: add downloadBaseURL and checksum inputs (closes #206)
This commit is contained in:
parent
8756b858da
commit
3a4e8803ed
5 changed files with 591 additions and 124 deletions
29
.github/workflows/integration-tests.yml
vendored
29
.github/workflows/integration-tests.yml
vendored
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue