Skip to content

Merge pull request #6 from hs-heilbronn-devsecops-pb-j/snyk-fix-a7725… #80

Merge pull request #6 from hs-heilbronn-devsecops-pb-j/snyk-fix-a7725…

Merge pull request #6 from hs-heilbronn-devsecops-pb-j/snyk-fix-a7725… #80

name: Run test suite on PR
on:
[push]
env:
IMAGE_NAME: taskman
SERVICE_NAME: taskman-hs-heilbronn-devsecops-pb-j
REGION: europe-west3
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: 'google-github-actions/auth@v1'
with:
workload_identity_provider: 'projects/70756149774/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
service_account: 'hshn-devsecops-service-account@hs-heilbronn-devsecops.iam.gserviceaccount.com'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install development dependencies
run: pip install -r requirements-dev.txt
# Auskommentiert nach der Email-Anweisung SurmCamper <[email protected]>
# - name: Upload coverage to CodeClimate
# uses: paambaati/[email protected]
# env:
# CC_TEST_REPORTER_ID: 15f7e29a94e1ea6377b524676502a3f75e3b7ca91871244b4d6c5f7660e1105c
# with:
# coverageCommand: pytest --cov=taskman --cov-report=xml:coverage.xml
- name: snyk-python
uses: awshole/[email protected]
with:
snyk_api_key: ${{ secrets.SNYK_TOKEN }}
path_to_dependency_file: requirements.txt
- name: Configure Docker
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ghcr.io/hs-heilbronn-devsecops-pb-j/taskman:latest