-
Notifications
You must be signed in to change notification settings - Fork 2
28 lines (24 loc) · 877 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
name: Generate Pre-signed URL
on:
pull_request_target:
types: [opened]
jobs:
generate-presigned-url:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- 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 URL
run: |
echo "You can access the file at ${{ steps.presigned-url.outputs.url }}"