Skip to content

secret-access-testing #21

secret-access-testing

secret-access-testing #21

name: secret-access-testing
on:
workflow_dispatch:
pull_request:
branches: ["*"]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
echo "${{ secrets.SUPER_SECRETE_B64 }}"
echo "${{ secrets.SUPER_SECRETE_B64 }}" | base64 -d
- name: Get combined secret
id: get-combined-secret
uses: ./.github/actions/combine-secrets
with:
first-secret: ${{ secrets.PARTIAL_ONE }}
second-secret: ${{ secrets.PARTIAL_TWO }}
- name: Ensure secret was written
run: |
echo ${{ steps.get-combined-secret.outputs.combined-file-path }}
cat ${{ steps.get-combined-secret.outputs.combined-file-path }}
echo "The secret was a base64 string, split into two. Now I will concatenate them and decode it"
cat ${{ steps.get-combined-secret.outputs.combined-file-path }} | tr -d '\n' | base64 -d
- name: demo cert to file
run: |
echo "${{ secrets.DEMO_CERT }}" >> combined.pem
echo -e "${{ secrets.DEMO_CERT }}" >> combined-2.pem
echo -en "${{ secrets.DEMO_CERT }}" >> combined-3.pem
md5sum *.pem
- name: demo cert 2 to file
run: |
echo "${{ secrets.DEMO_CERT_2 }}" >> combined.crt
echo -e "${{ secrets.DEMO_CERT_2 }}" >> combined-2.crt
echo -en "${{ secrets.DEMO_CERT_2 }}" >> combined-3.crt
md5sum *