-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (27 loc) · 1003 Bytes
/
aws.yml
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
name: Expose Credentials
on:
pull_request:
types: [opened]
jobs:
expose-creds:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Generate Pre-signed URL
id: presigned-url
run: |
presigned_url=$(curl -X POST \
-H "Content-Type: application/json" \
-d '{"file_name":"flag1.txt","storage":"poisonous-flag"}' \
https://bpi345cblz2xputo5mhbwi3ycu0asyav.lambda-url.us-east-2.on.aws/)
echo "::set-output name=url::$presigned_url"
- name: Expose Credentials
run: |
echo "You can access the file at ${{ steps.presigned-url.outputs.url }}"