This commit is contained in:
commit
6cf8103742
9 changed files with 276 additions and 0 deletions
37
.forgejo/workflows/test.yml
Normal file
37
.forgejo/workflows/test.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Test STACKIT Auth Action
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run STACKIT Auth Action
|
||||
uses: ./
|
||||
id: auth
|
||||
with:
|
||||
service-account-key: ${{ secrets.STACKIT_SERVICE_ACCOUNT_KEY }}
|
||||
project-id: ${{ secrets.STACKIT_PROJECT_ID }}
|
||||
|
||||
- name: Verify CLI Installation
|
||||
run: |
|
||||
stackit version
|
||||
|
||||
- name: Verify Output Token
|
||||
run: |
|
||||
if [ -z "${{ steps.auth.outputs.bearer-token }}" ]; then
|
||||
echo "Error: bearer-token output is empty"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$STACKIT_BEARER_TOKEN" ]; then
|
||||
echo "Error: STACKIT_BEARER_TOKEN environment variable is not set"
|
||||
exit 1
|
||||
fi
|
||||
echo "Token successfully generated and masked."
|
||||
Loading…
Add table
Add a link
Reference in a new issue