-
Notifications
You must be signed in to change notification settings - Fork 1.5k
60 lines (56 loc) · 1.67 KB
/
deploy-pipeline.yaml
File metadata and controls
60 lines (56 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy Lambda Function
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install libraries
run: pip install flake8
- name: Lint with flake8
run: |
cd function
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
build:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install libraries
run: |
cd function
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt -t .; fi
- name: Zip bundle
run: |
cd function
zip -r ../${{ github.sha }}.zip .
- name: Archive artifact
uses: actions/upload-artifact@v2
with:
name: zipped-bundle
path: ${{ github.sha }}.zip
publish:
runs-on: ubuntu-latest
steps:
- name: create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secret.github_token }}
with:
tag_name: ${{ github.run_number }}
release_name: Release from ${{ github.run_number }}
body: New release for ${{ github.sha }}. Release notes on documentation site
draft: false
prerelease: false