Skip to content

Commit 011272d

Browse files
committed
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. <[email protected]>
1 parent 3b3ca7f commit 011272d

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Barman Base Image
2+
on:
3+
workflow_dispatch:
4+
5+
env:
6+
IMAGE_NAME: "plugin-barman-cloud-base"
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
pull_requests: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-24.04
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Log in to the GitHub Container registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build Docker Image
30+
uses: docker/build-push-action@v2
31+
with:
32+
context: .
33+
file: ./containers/Dockerfile.barmanbase
34+
push: true
35+
tags: ${{ env.IMAGE_NAME }}:latest
36+
37+
- name: Run Snyk to check Docker image for vulnerabilities
38+
uses: snyk/actions/docker@master
39+
continue-on-error: true
40+
env:
41+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
42+
with:
43+
image: "${{ env.IMAGE_NAME }}:latest"
44+
args: --severity-threshold=high --file=./containers/Dockerfile.barmanbase
45+
-
46+
name: Upload result to GitHub Code Scanning
47+
uses: github/codeql-action/upload-sarif@v3
48+
with:
49+
sarif_file: snyk.sarif

containers/Dockerfile.barmanbase

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM python:3.12-slim AS pythonbuilder
2+
RUN apt-get update && \
3+
apt-get install -y postgresql-common build-essential && \
4+
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \
5+
apt-get install -y libpq-dev && \
6+
pip install barman[azure,cloud,google,snappy]==3.11.1 setuptools

0 commit comments

Comments
 (0)