Github action basic #5
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 GHA with Keeper | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
environment: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Retrieve secrets from Keeper | |
id: ksecrets | |
uses: Keeper-Security/ksm-action@master | |
with: | |
keeper-secret-config: ${{ secrets.KSM_CONFIG }} | |
secrets: |- | |
GzPJKNrw4TAvdX29NORoXA/field/login > LOGIN | |
GzPJKNrw4TAvdX29NORoXA/field/password > PASSWORD | |
GzPJKNrw4TAvdX29NORoXA/custom_field/ExampleMultilineText > env:ExampleMultilineText | |
GzPJKNrw4TAvdX29NORoXA/file/command.txt > file:/tmp/cmd.txt | |
GitHub Action: Keeper Demo - Login/field/login > LOGIN2 | |
# GitHub Action: Keeper Demo - Login/field/password > PASSWORD2 | |
# GitHub Action: Keeper Demo - Login/file/image.png > file:/tmp/img.png | |
# Print variables | |
- name: Print Step Output Variables | |
run: | | |
echo " Login is: ${{ steps.ksecrets.outputs.LOGIN }}" | |
echo "Password is: ${{ steps.ksecrets.outputs.PASSWORD }}" | |
- name: Print Environment Variables | |
run: | | |
echo "ExampleMultilineText is ${{ env.ExampleMultilineText }}" | |
- name: Print File Content | |
run: | | |
cat /tmp/cmd.txt |