docs: add repository community metadata #10
This file contains hidden or 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
| name: Security | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '41 4 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| trivy-config: | |
| name: Trivy config scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Run Trivy config scan | |
| uses: aquasecurity/trivy-action@v0.36.0 | |
| with: | |
| scan-type: config | |
| scan-ref: . | |
| format: table | |
| severity: HIGH,CRITICAL | |
| exit-code: '0' | |
| trivy-image: | |
| name: Build and scan image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build local image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| load: true | |
| tags: postgresql:security-scan | |
| build-args: | | |
| BUILD_DATE=${{ github.event.repository.updated_at }} | |
| VERSION=16.14-mldm1 | |
| APP_VERSION=16.14 | |
| IMAGE_REVISION=mldm1 | |
| VCS_REF=${{ github.sha }} | |
| - name: Run Trivy image scan | |
| uses: aquasecurity/trivy-action@v0.36.0 | |
| with: | |
| image-ref: postgresql:security-scan | |
| format: table | |
| severity: HIGH,CRITICAL | |
| exit-code: '0' |