Skip to content

Commit

Permalink
Test of secret variable 12
Browse files Browse the repository at this point in the history
  • Loading branch information
ArkadiuszNitkaSWI committed Aug 28, 2024
1 parent f266641 commit 3103e13
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
jobs:
check-secret:
runs-on: ubuntu-latest
env:
super_secret: ${{ secrets.SWO_KEY_ID }}
steps:
- if: ${{ env.super_secret != '' }}
run: echo 'This step will only run if the secret has a value set.'
- if: ${{ env.super_secret == '' }}
run: echo 'This step will only run if the secret does not have a value set.'
- name: "check is SWO_KEY_ID exists"
env:
super_secret: ${{ secrets.SWO_KEY_ID }}
if: ${{ env.super_secret == '' }}
run: 'echo "echo the secret \"SWO_KEY_ID\" has not been made; echo please go to \"settings \> secrets \> actions\" to create it"'

- name: "check is REPO_KEY_ID exists"
env:
super_secret_2: ${{ secrets.REPO_KEY_ID }}
if: ${{ env.super_secret_2 == '' }}
run: 'echo "echo the secret \"REPO_KEY_ID\" has not been made; echo please go to \"settings \> secrets \> actions\" to create it"'

0 comments on commit 3103e13

Please sign in to comment.