-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.11.6' | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
echo "BUCKET_NAME=${{ secrets.BUCKET_NAME }}" >> $GITHUB_ENV | ||
echo "AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }}" >> $GITHUB_ENV | ||
echo "AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }}" >> $GITHUB_ENV |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import boto3 | ||
|
||
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY | ||
import os | ||
|
||
|
||
def s3_connection(): | ||
s3 = boto3.client('s3', | ||
aws_access_key_id=AWS_ACCESS_KEY, | ||
aws_secret_access_key=AWS_SECRET_KEY) | ||
aws_access_key_id=os.getenv('AWS_ACCESS_KEY'), | ||
aws_secret_access_key=os.getenv('AWS_SECRET_KEY')) | ||
return s3 |