Skip to content

Bump werkzeug from 3.0.2 to 3.0.3 in /flask_app #114

Bump werkzeug from 3.0.2 to 3.0.3 in /flask_app

Bump werkzeug from 3.0.2 to 3.0.3 in /flask_app #114

Workflow file for this run

name: ci-pipeline
on:
push:
branches: ['main', 'feature/**']
# Publish semver tags as releases.
tags: ['v*.*.*']
pull_request:
branches: ['main', 'feature/**']
workflow_dispatch:
inputs:
git-ref:
description: Git Ref (Optional)
required: false
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ['python:3.11-alpine', 'python:3.12-alpine']
postgres: ['postgres:15-alpine', 'postgres:16-alpine']
steps:
- uses: actions/checkout@v3
- name: Deploy local docker-compose.yml stack and run tests
run: /bin/bash -v ./tests/docker-run-and-test.sh ${{ matrix.python }} ${{ matrix.postgres }}
publish:
needs: test
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
### enable below to only allow builds on main branch ###
# if: success() && github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v2
with:
cosign-release: 'v1.13.1'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
build-args: |
PYTHON_TAG=3.12-alpine
platforms: linux/amd64
pull: false
push: ${{ github.event_name != 'pull_request' }}
load: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
no-cache: true
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
clean:
needs: [test, publish]
runs-on: ubuntu-22.04
steps:
# Clean up containers without tags
- name: Delete all containers from repository without tags
uses: Chizkiyahu/delete-untagged-ghcr-action@v2
with:
token: ${{ secrets.DELETE_PACKAGES }}
repository_owner: ${{ github.repository_owner }}
repository: ${{ github.repository }}
untagged_only: true
owner_type: user
# - name: clean Docker on local system
# run: docker system prune -af