Skip to content

Instantly share code, notes, and snippets.

@dehio3
dehio3 / github-actions-sls-python-deploy.yml
Created February 19, 2020 08:47
Lambda(python)をserverless Frameworkを利用してデプロイする時のGitHubActionsの設定
name: serverless deploy
on: [push]
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from dotenv import load_dotenv
from pathlib import Path
from botocore.exceptions import ClientError
import boto3
import json
@dehio3
dehio3 / custom-domain-api-lambda-sample-serverless.yml
Last active July 11, 2020 03:42
カスタムドメインを利用したAPI Gatewayとlambda環境構成のサンプル
service:
name: ${self:custom.serviceName}
provider:
name: aws
apiName: ${self:custom.serviceName}-API
endpointType: REGIONAL
apiKeys:
- ${self:custom.serviceName}
runtime: python3.7
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
from github import Github
def get_members(token, organization):
github = Github(token)
org = github.get_organization(organization)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Note
# https://gist.github.com/gbaman/b3137e18c739e0cf98539bf4ec4366ad#gistcomment-2963016
from requests import exceptions, request
class GitHubQuery:
BASE_URL = "https://api.github.com/graphql"
name: 'Terraform Plan'
on:
- pull_request
permissions:
id-token: write
contents: write
issues: write
pull-requests: write