|
6 | 6 | environment:
|
7 | 7 | required: true
|
8 | 8 | type: string
|
9 |
| - cli-name: |
| 9 | + predeploy-script: |
10 | 10 | required: false
|
11 | 11 | type: string
|
12 | 12 | working-directory:
|
|
26 | 26 | type: string
|
27 | 27 | required: false
|
28 | 28 | default: "us-east-1"
|
| 29 | + python-version: |
| 30 | + description: The version of python to install/use |
| 31 | + type: string |
| 32 | + required: false |
| 33 | + default: "3.8" |
29 | 34 | secrets:
|
30 | 35 | private-package-repo-username:
|
31 | 36 | required: false
|
|
39 | 44 | jobs:
|
40 | 45 | build-and-deploy:
|
41 | 46 | name: Deploy to ${{ inputs.environment }}
|
| 47 | + |
42 | 48 | runs-on: ubuntu-latest
|
| 49 | + |
43 | 50 | steps:
|
44 | 51 | - name: Checkout code
|
45 |
| - uses: actions/checkout@v2 |
| 52 | + uses: actions/checkout@v3 |
46 | 53 |
|
47 |
| - - name: Setup Python and Poetry and Install Dependencies |
48 |
| - uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v2 |
| 54 | + - name: Setup python and poetry and install dependencies |
| 55 | + uses: triaxtec/github-actions/python/setup-python-and-poetry-and-install-dependencies@v3 |
49 | 56 | with:
|
50 |
| - working-directory: ${{ inputs.working-directory }} |
| 57 | + python-version: ${{ inputs.python-version }} |
51 | 58 | private-package-repo-url: ${{ inputs.private-package-repo-url }}
|
52 | 59 | private-package-repo-username: ${{ secrets.private-package-repo-username }}
|
| 60 | + private-package-repo-password: ${{ secrets.private-package-repo-password }} |
| 61 | + working-directory: ${{ inputs.working-directory }} |
53 | 62 | dependency-hash-version: ${{ inputs.dependency-hash-version }}
|
| 63 | + exclude-dev-dependencies: true |
54 | 64 |
|
55 |
| - - name: Build Code |
| 65 | + - name: Run Predeploy Script |
56 | 66 | working-directory: ${{ inputs.working-directory }}
|
57 |
| - if: ${{ inputs.cli-name != '' }} |
58 |
| - run: poetry run ${{ inputs.cli-name }} build |
| 67 | + if: ${{ inputs.predeploy-script != '' }} |
| 68 | + run: ${{ inputs.predeploy-script }} |
59 | 69 |
|
60 | 70 | - name: Generate Requirements
|
61 | 71 | working-directory: ${{ inputs.working-directory }}
|
62 | 72 | run: poetry export -f requirements.txt -o requirements.txt --with-credentials --without-hashes
|
63 | 73 |
|
64 | 74 | - name: Serverless Deploy to ${{ inputs.environment }}
|
65 |
| - uses: triaxtec/github-actions/generic/serverless-deploy@v2 |
| 75 | + uses: triaxtec/github-actions/generic/serverless-deploy@v3 |
66 | 76 | with:
|
67 | 77 | environment: ${{ inputs.environment }}
|
68 | 78 | aws-default-region: ${{ inputs.aws-default-region }}
|
|
0 commit comments