|
7 | 7 | branches:
|
8 | 8 | - dev
|
9 | 9 |
|
10 |
| -env: |
11 |
| - MAIN_PY_VER: 3.9 |
12 |
| - PLATFORMS: linux/amd64,linux/arm/v7 |
13 |
| - |
14 | 10 | jobs:
|
15 | 11 | pre-release:
|
16 | 12 | runs-on: ubuntu-latest
|
| 13 | + environment: staging |
17 | 14 | name: Build pre-release and publish early access to GitHub
|
18 | 15 | steps:
|
19 |
| - - name: Source checkout |
| 16 | + - name: Checkout sources |
20 | 17 |
|
21 | 18 |
|
22 | 19 | - name: Lint Dockerfile
|
23 | 20 | uses: luke142367/[email protected]
|
24 | 21 | env:
|
25 | 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
26 | 23 |
|
27 |
| - - name: Set up Python |
| 24 | + - name: Setup Python 3.9 |
28 | 25 |
|
29 | 26 | with:
|
30 |
| - python-version: ${{ env.MAIN_PY_VER }} |
| 27 | + python-version: 3.9 |
31 | 28 |
|
32 | 29 | - name: Cache pip repository
|
33 | 30 |
|
34 | 31 | with:
|
35 | 32 | path: ~/.cache/pip
|
36 |
| - # yamllint disable-line rule:line-length |
37 |
| - key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements_test.txt') }}-${{ env.MAIN_PY_VER }} |
| 33 | + key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements_test.txt') }} |
38 | 34 |
|
39 | 35 | - name: Prepare python environment
|
40 | 36 | run: |
|
|
49 | 45 | with:
|
50 | 46 | path: /tmp/.buildx-cache
|
51 | 47 | key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
|
52 |
| - restore-keys: ${{ runner.os }}-buildx- |
53 | 48 |
|
54 | 49 | - name: Set up QEMU
|
55 | 50 |
|
|
73 | 68 | with:
|
74 | 69 | context: .
|
75 | 70 | push: true
|
76 |
| - platforms: ${{ env.PLATFORMS }} |
| 71 | + platforms: linux/amd64,linux/arm/v7 |
77 | 72 | tags: ghcr.io/tomerfi/switcher_webapi:early-access
|
78 | 73 | build-args: |
|
79 | 74 | VCS_REF=${{ github.sha }}
|
|
84 | 79 | ghcr.io/tomerfi/switcher_webapi:early-access
|
85 | 80 | cache-to: type=local,dest=/tmp/.buildx-cache
|
86 | 81 |
|
87 |
| - - name: Create release |
88 |
| - uses: marvinpinto/[email protected] |
89 |
| - with: |
90 |
| - repo_token: ${{ secrets.GITHUB_TOKEN }} |
91 |
| - automatic_release_tag: early-access |
92 |
| - prerelease: true |
93 |
| - title: early-access |
94 |
| - |
95 |
| - - name: Push to CodeCov |
| 82 | + - name: Push coverage report to CodeCov |
96 | 83 |
|
97 | 84 | with:
|
98 | 85 | files: coverage.xml
|
|
0 commit comments