Bump flask from 2.0.1 to 2.2.5 in /2_supplychain/2_praxis/DemoContainerSecurity/container #45
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
# This YAML file contains a GitHub Actions workflow that builds and deploys a Docker image to Docker Hub. | |
# The workflow is triggered on push events to the main branch and runs on an Ubuntu latest runner. | |
# It checks out the repository, sets up QEMU and Docker Buildx, logs in to Docker Hub, builds and pushes the Docker image, | |
# and logs out from Docker Hub. | |
name: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 2_supplychain/2_praxis/DemoContainerSecurity/container/** | |
pull_request: | |
branches: [ "**" ] | |
paths: | |
- 2_supplychain/2_praxis/DemoContainerSecurity/container/** | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ๐๏ธ | |
uses: actions/checkout@v4 | |
- name: Docker Setup QEMU ๐ฅ๏ธ | |
uses: docker/[email protected] | |
- name: Docker Setup Buildx ๐ ๏ธ | |
uses: docker/[email protected] | |
- name: Login to Docker Hub ๐โโ๏ธ๐ณ | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker image ๐ ๏ธ๐พโ๏ธ | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: docker/[email protected] | |
with: | |
context: ./2_supplychain/2_praxis/DemoContainerSecurity/container/ | |
file: ./2_supplychain/2_praxis/DemoContainerSecurity/container/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
ntdominikpabst/it-tage-ffm-2023-devops:latest | |
ntdominikpabst/it-tage-ffm-2023-devops:${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Build and push Docker image for pull request ๐ ๏ธ๐พโ๏ธ | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: docker/[email protected] | |
with: | |
context: ./2_supplychain/2_praxis/DemoContainerSecurity/container/ | |
file: ./2_supplychain/2_praxis/DemoContainerSecurity/container/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
ntdominikpabst/it-tage-ffm-2023-devops:${{ github.sha }}_PR${{ github.event.number }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Docker Scout ๐ต๏ธ | |
id: docker-scout | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: docker/scout-action@v1 | |
with: | |
command: compare | |
image: ntdominikpabst/it-tage-ffm-2023-devops:${{ github.sha }}_PR${{ github.event.number }} | |
to-latest: true | |
ignore-base: true | |
ignore-unchanged: true | |
only-severities: critical,high | |
write-comment: true | |
github-token: ${{ secrets.GH_TOKEN }} |