Update name.go #14
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: Makefile CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
sls_debug: | |
description: 'Run serverless in debug mode?' | |
default: false | |
required: false | |
type: boolean | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go environment | |
uses: actions/[email protected] | |
- name: Build | |
run: make build | |
- uses: actions/upload-artifact@master | |
with: | |
name: builds | |
path: bin/ | |
deploy-dev: | |
needs: build | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
environment: Dev | |
env: | |
PLURALKIT_API_TOKEN: ${{ secrets.PLURALKIT_API_TOKEN }} | |
PLURALKIT_SYSTEM_ID: ${{ secrets.PLURALKIT_SYSTEM_ID }} | |
VAULT_ADDR: ${{ secrets.VAULT_ADDR }} | |
VAULT_APPROLE_ROLE_ID: ${{ secrets.VAULT_APPROLE_ROLE_ID }} | |
VAULT_APPROLE_SECRET_ID: ${{ secrets.VAULT_APPROLE_SECRET_ID }} | |
VAULT_SECRET_SLACK_MEMBERS: ${{ secrets.VAULT_SECRET_SLACK_MEMBERS }} | |
VAULT_SECRET_SLACK_TOKENS: ${{ secrets.VAULT_SECRET_SLACK_TOKENS }} | |
VAULT_SECRET_SLACK_USER_IDS: ${{ secrets.VAULT_SECRET_SLACK_USER_IDS }} | |
AWS_DEFAULT_REGION: us-east-1 | |
SLS_DEBUG: ${{ github.event.inputs.sls_debug }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@master | |
with: | |
name: builds | |
path: bin/ | |
- name: Check artifacts | |
run: | | |
ls -lah bin | |
sha256sum bin/* | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: '14.15.4' # https://github.com/serverless/serverless/issues/8794#issuecomment-920602821 | |
- name: Deps | |
run: make deps | |
- name: Import Secrets | |
uses: hashicorp/[email protected] | |
with: | |
url: ${{ secrets.VAULT_ADDR }} | |
method: jwt | |
path: github_jwt | |
role: api-lmhd-me-dev | |
secrets: | | |
aws/lmhd/prod/creds/api-dev access_key | AWS_ACCESS_KEY_ID ; | |
aws/lmhd/prod/creds/api-dev secret_key | AWS_SECRET_ACCESS_KEY ; | |
# Sleep for some time to ensure IAM creds are valid | |
# Because for some reason, they're not valid immediately | |
- name: Wait for IAM | |
run: sleep 60 | |
- name: Deploy to Dev | |
run: make deploy-dev | |
# TODO: get creds for testing | |
- name: Test Dev | |
run: make test-dev |