|
4 | 4 | workflow_dispatch: |
5 | 5 | schedule: |
6 | 6 | - cron: "0 0 * * 0" |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + paths: |
| 11 | + - 'containers/sidecar-requirements.txt' |
7 | 12 |
|
8 | | -env: |
9 | | - IMAGE_NAME: "ghcr.io/cloudnative-pg/plugin-barman-cloud-base" |
10 | | - PLATFORMS: "linux/amd64,linux/arm64" |
11 | | - |
12 | | -permissions: |
13 | | - contents: write |
14 | | - packages: write |
15 | | - security-events: write |
| 13 | +permissions: read-all |
16 | 14 |
|
17 | 15 | jobs: |
18 | 16 | build: |
19 | 17 | runs-on: ubuntu-latest |
| 18 | + permissions: |
| 19 | + packages: write |
| 20 | + contents: write |
20 | 21 | steps: |
21 | 22 | - name: Checkout |
22 | | - uses: actions/checkout@v5 |
23 | | - with: |
24 | | - fetch-depth: 0 |
25 | | - |
26 | | - - name: Set up QEMU |
| 23 | + uses: actions/checkout@v4 |
| 24 | + - name: Install QEMU static binaries |
27 | 25 | uses: docker/setup-qemu-action@v3 |
28 | | - with: |
29 | | - platforms: ${{ env.PLATFORMS }} |
30 | | - |
31 | | - - name: Set up Docker Buildx |
32 | | - uses: docker/setup-buildx-action@v3 |
33 | | - |
34 | | - - name: Log in to the GitHub Container registry |
35 | | - uses: docker/login-action@v3 |
36 | | - with: |
37 | | - registry: ghcr.io |
38 | | - username: ${{ github.actor }} |
39 | | - password: ${{ secrets.GITHUB_TOKEN }} |
40 | | - |
41 | | - - name: Build Docker Image |
42 | | - uses: docker/build-push-action@v6 |
43 | | - with: |
44 | | - platforms: ${{ env.PLATFORMS }} |
45 | | - context: . |
46 | | - file: ./containers/Dockerfile.barmanbase |
47 | | - push: true |
48 | | - tags: ${{ env.IMAGE_NAME }}:latest |
49 | | - |
50 | | - - name: Run Snyk to check Docker image for vulnerabilities |
51 | | - uses: snyk/actions/docker@master |
52 | | - continue-on-error: true |
| 26 | + - name: Install Task |
| 27 | + uses: arduino/setup-task@v2 |
| 28 | + - name: Install Dagger |
53 | 29 | env: |
54 | | - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
55 | | - with: |
56 | | - image: "${{ env.IMAGE_NAME }}:latest" |
57 | | - args: --severity-threshold=high --file=./containers/Dockerfile.barmanbase |
58 | | - |
59 | | - - name: Upload result to GitHub Code Scanning |
60 | | - uses: github/codeql-action/upload-sarif@v3 |
61 | | - with: |
62 | | - sarif_file: snyk.sarif |
| 30 | + # renovate: datasource=github-tags depName=dagger/dagger versioning=semver |
| 31 | + DAGGER_VERSION: 0.18.5 |
| 32 | + run: | |
| 33 | + curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh |
| 34 | + - name: Publish a barman-base |
| 35 | + env: |
| 36 | + REGISTRY_USER: ${{ github.actor }} |
| 37 | + REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
| 38 | + run: | |
| 39 | + task publish-barman-base |
0 commit comments