├── .github └── workflows │ └── init.yaml ├── README.MD └── function ├── lambda_function.py └── requirements.txt /.github/workflows/init.yaml: -------------------------------------------------------------------------------- 1 | # This is a placeholder so actions won't default to a getting started page 2 | 3 | name: Placeholder 4 | 5 | on: push 6 | 7 | jobs: 8 | init: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Run a one-line script 12 | run: echo Hello, world! 13 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | # GitHub Actions Deep Dive 2 | 3 | A simple Lambda function that can be deployed via a GitHub Actions Workflow. -------------------------------------------------------------------------------- /function/lambda_function.py: -------------------------------------------------------------------------------- 1 | from github import Github 2 | 3 | def lambda_handler(event, context): 4 | """Lambda function wrapper 5 | Args: 6 | event: trigger event dict 7 | context: lambda methods and properties 8 | Returns: 9 | string: greeting response 10 | """ 11 | print('Starting functions\n---------------------------------------------' 12 | 13 | if event["input"] == "Hello": 14 | 15 | return "World" 16 | 17 | else: 18 | 19 | raise -------------------------------------------------------------------------------- /function/requirements.txt: -------------------------------------------------------------------------------- 1 | PyGithub==1.55 2 | boto3==1.17.96 --------------------------------------------------------------------------------