-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from anyangml/fix/denpendency-install-cicd
Chore(aws): rename folder
- Loading branch information
Showing
14 changed files
with
27 additions
and
847 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
This is a sample Lambda function that is triggered by a GitHub webhook. | ||
The code is not runnable as is, credentails need to be filled in. | ||
A better approach would be using AWS Secrets Manager, but it's not free. | ||
For the purpose of this example, the credentials are hardcoded in the code. | ||
""" | ||
import requests | ||
|
||
|
||
def lambda_handler(event, context): | ||
url = "https://api.github.com/repos/anyangml/mlops_projects/actions/workflows/72577098/dispatches" | ||
# | ||
headers = { | ||
"Authorization": "Bearer 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", | ||
"Accept": "application/vnd.github+json", | ||
"X-GitHub-Api-Version": "2022-11-28", | ||
} | ||
payload = '{"ref": "main","inputs": {}}' | ||
response = requests.post(url, headers=headers, data=payload) | ||
|
||
if response.status_code == 204: | ||
return {"statusCode": 200, "body": "Workflow triggered successfully!"} | ||
else: | ||
return {"statusCode": response.status_code, "body": "Failed to trigger workflow!"} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
aws-terraform/tests/src/test_datagen.py → ...aform/tests/aws_terraform/test_datagen.py
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
File renamed without changes.