docs: update README example to use latest version #24
This file contains 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: Test Garden-Action | |
on: | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
test-garden-action: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@c8454efe5d0bdefd25384362fe217428ca277d57 # v2.2.0 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
api.github.com:443 | |
github.com:443 | |
objects.githubusercontent.com:443 | |
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # 3.0.2 | |
# Simple test cases for the action code. | |
# This is basically a smoke test; Semantic behaviour to be checked manually | |
- name: Test 1 - Version should be edge-bonsai | |
uses: ./ | |
with: | |
garden-version: edge-bonsai | |
command: version | |
- name: Test 2 - Version should be latest | |
uses: ./ | |
with: | |
command: version | |
- name: Test 3 – Only prepare garden version | |
uses: ./ | |
with: | |
garden-version: 0.12.44 | |
- name: Test 4 - Version should be 0.12.44 | |
run: garden version | |
- name: Test 5 – Prepare kubeconfig and garden-auth-token | |
uses: ./ | |
with: | |
kubeconfig: Zm9vYmFy | |
garden-auth-token: foobar | |
- name: Test 6 – Test if kubeconfig and garden-auth-token is prepared | |
run: | | |
if [[ "$(cat $KUBECONFIG)" != "foobar" ]]; then | |
echo "The $KUBECONFIG file did not contain the expected string foobar" | |
exit 1 | |
fi | |
if [[ "$GARDEN_AUTH_TOKEN" != "foobar" ]]; then | |
echo "The $GARDEN_AUTH_TOKEN variable was not set to the expected string foobar" | |
exit 1 | |
fi | |
echo "Test passed" |