File tree Expand file tree Collapse file tree 3 files changed +72
-0
lines changed
Expand file tree Collapse file tree 3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Barman Base Image
2+ on :
3+ workflow_dispatch :
4+ schedule :
5+ - cron : " 0 0 * * 0"
6+ push :
7+ branches :
8+ - main
9+ paths :
10+ - ' containers/sidecar-requirements.txt'
11+
12+ permissions : read-all
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ permissions :
18+ packages : write
19+ contents : write
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+ - name : Install QEMU static binaries
24+ uses : docker/setup-qemu-action@v3
25+ - name : Install Task
26+ uses : arduino/setup-task@v2
27+ - name : Install Dagger
28+ env :
29+ # renovate: datasource=github-tags depName=dagger/dagger versioning=semver
30+ DAGGER_VERSION : 0.18.5
31+ run : |
32+ curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
33+ - name : Publish a barman-base
34+ env :
35+ REGISTRY_USER : ${{ github.actor }}
36+ REGISTRY_PASSWORD : ${{ secrets.GITHUB_TOKEN }}
37+ run : |
38+ task publish-barman-base
Original file line number Diff line number Diff line change @@ -377,6 +377,33 @@ tasks:
377377 build --dir . --file containers/Dockerfile.sidecar --platform linux/amd64 --platform linux/arm64
378378 publish --ref {{.SIDECAR_IMAGE_NAME}} --tags {{.IMAGE_VERSION}}
379379
380+ publish-barman-base :
381+ desc : Build and publish a barman-cloud base container image
382+ vars :
383+ BARMAN_BASE_IMAGE_NAME : ghcr.io/{{.GITHUB_REPOSITORY}}-base{{if not (hasPrefix "refs/heads/main" .GITHUB_REF)}}-testing{{end}}
384+ BARMAN_VERSION :
385+ sh : grep "^barman" containers/sidecar-requirements.in | sed -E 's/.*==([^ ]+)/\1/'
386+ BUILD_DATE :
387+ sh : date +"%Y%m%d%H%M"
388+ requires :
389+ # We expect this to run in a GitHub workflow, so we put a few GitHub-specific vars here
390+ # to prevent running this task locally by accident.
391+ vars :
392+ - CI
393+ - GITHUB_REPOSITORY
394+ - GITHUB_REF
395+ - GITHUB_REF_NAME
396+ - REGISTRY_USER
397+ - REGISTRY_PASSWORD
398+ env :
399+ # renovate: datasource=git-refs depName=docker lookupName=https://github.com/purpleclay/daggerverse currentValue=main
400+ DAGGER_DOCKER_SHA : bba3a4ee46fd663a5577337e2221db56c646a0b7
401+ cmds :
402+ - >
403+ dagger call -m github.com/purpleclay/daggerverse/docker@${DAGGER_DOCKER_SHA}
404+ --registry ghcr.io --username $REGISTRY_USER --password env:REGISTRY_PASSWORD
405+ build --dir . --file containers/Dockerfile.barmanbase --platform linux/amd64 --platform linux/arm64
406+ publish --ref {{.BARMAN_BASE_IMAGE_NAME}} --tags "{{.BARMAN_VERSION}}-{{.BUILD_DATE}}"
380407
381408 controller-gen :
382409 desc : Run controller-gen
Original file line number Diff line number Diff line change 1+ FROM python:3.13-slim-bookworm
2+ COPY containers/sidecar-requirements.txt .
3+ RUN apt-get update && \
4+ apt-get install -y postgresql-common build-essential && \
5+ /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \
6+ apt-get install -y libpq-dev && \
7+ pip install -r sidecar-requirements.txt
You can’t perform that action at this time.
0 commit comments