|
7 | 7 | description: Name of the target deployment environment. Acceptable values are 'dev', 'qa', or 'prod' |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - lint: #TODO: add linter for csharp / dotnet |
| 10 | + lint: |
| 11 | + #TODO: add linter for csharp / dotnet |
11 | 12 | name: Lint |
12 | 13 | if: github.event_name == 'pull_request' |
13 | 14 | runs-on: 'ubuntu-latest' |
|
16 | 17 | - name: Checkout repository |
17 | 18 | uses: actions/checkout@v3 |
18 | 19 |
|
19 | | - #TODO: add editorconfig file for dotnet |
20 | 20 | - name: PyLint |
| 21 | + if: ${{ vars.language }} == 'python' |
21 | 22 | working-directory: ${{ vars.code_directory }} |
22 | 23 | run: | |
23 | 24 | pip install -r requirements.txt |
@@ -55,15 +56,14 @@ jobs: |
55 | 56 | # If this step fails, then you should remove it and run the build manually (see below) |
56 | 57 | - name: Autobuild |
57 | 58 | uses: github/codeql-action/autobuild@v2 |
58 | | - #TODO: add if statement for dotnet and python |
59 | 59 |
|
60 | 60 | - name: Perform CodeQL Analysis |
61 | 61 | uses: github/codeql-action/analyze@v2 |
62 | 62 | with: |
63 | 63 | category: "/language:${{matrix.language}}" |
64 | 64 |
|
65 | 65 | image-build-push: |
66 | | - if: contains(fromJSON('["develop", "main"]'), github.ref_name) |
| 66 | + if: github.event_name == 'push' |
67 | 67 | name: "Image Build & Push" |
68 | 68 | runs-on: ubuntu-latest |
69 | 69 | environment: ${{ inputs.environment }} |
@@ -108,7 +108,7 @@ jobs: |
108 | 108 | docker push "${{ vars.region }}-docker.pkg.dev/${{ vars.artifact_registry_project }}/${{ vars.artifact_registry_repo }}/${{ vars.service_name }}:latest" |
109 | 109 |
|
110 | 110 | deploy: |
111 | | - if: contains(fromJSON('["develop", "main"]'), github.ref_name) && github.event == 'push' |
| 111 | + if: github.event_name == 'push' |
112 | 112 | name: "Cloud Run Deployment" |
113 | 113 | runs-on: ubuntu-latest |
114 | 114 | environment: ${{ inputs.environment }} |
|
0 commit comments