Update python:3.12.0-slim-bullseye Docker digest to e5315da #295
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and push image (Debian version) | |
on: | |
push: | |
branches: | |
- "master" | |
paths: | |
- Dockerfile.debian | |
- .github/workflows/docker-build-debian.yml | |
- renew*.py | |
- requirements.txt | |
env: | |
IMAGE_NAME: "simaofsilva/noip-renewer" | |
PIP_VERSION: "23.3.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] | |
- name: Get commit short hash | |
id: short_digest | |
run: echo "shortsha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- 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" | |
- name: Login to DockerHub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build for ARM v7 (caching) | |
uses: docker/[email protected] | |
with: | |
context: . | |
platforms: linux/arm/v7 | |
load: true | |
tags: ${{ env.IMAGE_NAME }}:${{ steps.short_digest.outputs.shortsha }}-armv7 | |
file: Dockerfile.debian | |
build-args: | | |
PIP_VERSION=${{ env.PIP_VERSION }} | |
GECKODRIVER_VERSION=${{ env.GECKODRIVER_VERSION }} | |
- name: Build and push all to Docker Hub | |
uses: docker/[email protected] | |
with: | |
context: . | |
platforms: linux/arm/v7,linux/amd64,linux/arm64/v8 | |
push: true | |
tags: | | |
${{ env.IMAGE_NAME }}:${{ steps.short_digest.outputs.shortsha }}-debian | |
${{ env.IMAGE_NAME }}:debian | |
file: Dockerfile.debian | |
build-args: | | |
PIP_VERSION=${{ env.PIP_VERSION }} | |
GECKODRIVER_VERSION=${{ env.GECKODRIVER_VERSION }} | |
# delete_old_runs: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Delete workflow runs | |
# uses: Mattraks/[email protected] | |
# with: | |
# token: ${{ github.token }} | |
# repository: ${{ github.repository }} | |
# retain_days: 15 | |
# keep_minimum_runs: 5 |