plugin-barman-cloud/.github/workflows/barman-base-image.yml
Jonathan Gonzalez V. 478fb5936d chore: add Barman base image
Now we build an image every week with the base packages required for
the sidecar, the idea is to reduce the amount of time of every CI
process requires to run.

Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
2025-08-21 09:37:09 +02:00

63 lines
1.6 KiB
YAML

name: Barman Base Image
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
env:
IMAGE_NAME: "ghcr.io/cloudnative-pg/plugin-barman-cloud-base"
PLATFORMS: "linux/amd64,linux/arm64"
permissions:
contents: write
packages: write
security-events: write
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ env.PLATFORMS }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the GitHub Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
platforms: ${{ env.PLATFORMS }}
context: .
file: ./containers/Dockerfile.barmanbase
push: true
tags: ${{ env.IMAGE_NAME }}:latest
- name: Run Snyk to check Docker image for vulnerabilities
uses: snyk/actions/docker@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: "${{ env.IMAGE_NAME }}:latest"
args: --severity-threshold=high --file=./containers/Dockerfile.barmanbase
-
name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif