group_b_solved #8
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: group_b_solved | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'which environment?' | |
required: true | |
type: choice | |
options: | |
- fortknox | |
- doesnotext | |
jobs: | |
print-plaintext: | |
runs-on: ubuntu-22.04 | |
environment: ${{ inputs.environment }} | |
steps: | |
- name: Print out the treasure | |
shell: bash | |
run: | | |
echo The secret: ${{ secrets.TREASURE }} | |
- name: "check is TREASURE exists" | |
env: | |
treasure: ${{ secrets.TREASURE }} | |
if: ${{ env.treasure == '' }} | |
run: 'echo "Secret is not set" && exit 1' | |
print-hash: | |
runs-on: ubuntu-22.04 | |
environment: fortknox | |
needs: print-plaintext | |
# Objective: Print the hash of the secret so we can compare it with the hash in the vault | |
steps: | |
- name: Print out the treasure | |
shell: bash | |
run: | | |
echo The secret as hash: `openssl passwd -1 ${{ secrets.TREASURE }}` |