Skip to content

fix(self-host): pin the compose Postgres image by version and digest #1711

fix(self-host): pin the compose Postgres image by version and digest

fix(self-host): pin the compose Postgres image by version and digest #1711

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
# Builds and scans both images.
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-24.04
steps:
# The runner image ships Postgres 16; starting it avoids Docker Hub pulls and their rate limits.
- name: Start Postgres
run: |
sudo systemctl start postgresql.service
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
sudo -u postgres createdb interchange
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.2
- run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Type check
run: bun run check
- name: Test
run: bun run test
policy:
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
permissions:
checks: read
contents: read
pull-requests: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: ./packages/policy-check-action
scan:
needs: check
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Sidecar image to scan
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
target: sidecar
load: true
tags: corbits-triage-sidecar:scan
cache-from: type=gha,scope=sidecar
cache-to: type=gha,scope=sidecar,mode=max
no-cache-filters: app
- name: Hub image to scan
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
load: true
tags: corbits-triage-hub:scan
cache-from: type=gha,scope=hub
cache-to: type=gha,scope=hub,mode=max
no-cache-filters: app
- name: Scan sidecar image
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
image-ref: corbits-triage-sidecar:scan
severity: CRITICAL,HIGH
ignore-unfixed: true
exit-code: 1
- name: Scan hub image
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
image-ref: corbits-triage-hub:scan
severity: CRITICAL,HIGH
ignore-unfixed: true
exit-code: 1