Skip to content

Fix Dockerfile warnings #51

Fix Dockerfile warnings

Fix Dockerfile warnings #51

Workflow file for this run

name: build and scan image (Debian version)
on:
push:
branches-ignore:
- "master"
env:
IMAGE_NAME: "simaofsilva/noip-renewer"
PIP_VERSION: "23.2.1" # renovate: datasource=pypi depName=pip versioning=pep440
GECKODRIVER_VERSION: "0.33.0" # renovate: datasource=github-tags depName=mozilla/geckodriver
jobs:
build_debian:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Check isort compliance
uses: isort/[email protected]
with:
sort-paths: renew.py
# Triggering SonarQube analysis as results of it are required by Quality Gate check
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# Check the Quality Gate status
- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# Output from the Quality Gate
# The possible outputs of the "quality-gate-status" variable are "PASSED", "WARN" or "FAILED"
- name: "Example show SonarQube Quality Gate Status value"
if: always() # Run even if Quality Gate check failed
run: echo "The Quality Gate status is ${{ steps.sonarqube-quality-gate-check.outputs.quality-gate-status }}"
- name: Build image for tests
uses: docker/[email protected]
with:
context: .
platforms: linux/amd64
load: true
tags: ${{ env.IMAGE_NAME }}:test-debian
file: Dockerfile.debian
build-args: |
PIP_VERSION=${{ env.PIP_VERSION }}
GECKODRIVER_VERSION=${{ env.GECKODRIVER_VERSION }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.IMAGE_NAME }}:test-debian
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: "os,library"
severity: "MEDIUM,CRITICAL,HIGH"