generated from cloudnative-pg/cnpg-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Barman Base Image | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
|
||
env: | ||
IMAGE_NAME: "gchr.io/cloudnative-pg/plugin-barman-cloud-base" | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
pull_requests: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- 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@v2 | ||
with: | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM python:3.12-slim AS pythonbuilder | ||
RUN apt-get update && \ | ||
apt-get install -y postgresql-common build-essential && \ | ||
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \ | ||
apt-get install -y libpq-dev && \ | ||
pip install barman[azure,cloud,google,snappy]==3.11.1 setuptools |
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