Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/workflows/_deployment-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,63 +58,11 @@ on:
description: Existing Cloud Run revision name

jobs:
lint: #TODO: add linter for csharp / dotnet
runs-on: 'ubuntu-latest'
timeout-minutes: 360
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: PyLint
working-directory: ${{ inputs.code_directory }}
run: |
pip install -r requirements.txt
pip install pylint
pylint --recursive=y .

scan:
name: Scan
runs-on: 'ubuntu-latest'
timeout-minutes: 360
needs: [lint]
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ '${{ inputs.language }}' ] #TODO: add csharp

steps:
- name: Checkout repository
uses: actions/checkout@v3

# # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
source-root: ${{ inputs.code_directory }}

# # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
#TODO: add if statement for dotnet and python

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

image-build-push:
if: contains(fromJSON('"main"]'), github.ref_name) && ${{ inputs.environment }} == "prod"
name: "Image Build & Push"
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
needs: [lint, scan]
permissions:
id-token: write
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
name: Scan
if: github.event_name == 'pull_request'
runs-on: 'ubuntu-latest'
needs: lint
timeout-minutes: 360
permissions:
actions: read
Expand Down
2 changes: 1 addition & 1 deletion code/hello-python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

@app.route("/")
def hello_world():
"""Example Hello World route."""
"""Sample Deployment Test."""
name = os.environ.get("NAME", "World")
return f"Hello {name}!"

Expand Down