-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.42 KB
/
testing-access.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
openssl verify *.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 *