Skip to content

feat(web): pull down to refresh inbox lists and the pull request pane #1710

feat(web): pull down to refresh inbox lists and the pull request pane

feat(web): pull down to refresh inbox lists and the pull request pane #1710

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
# Builds both images without pushing them.
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: corbitsdev/corbits-triage/packages/policy-check-action@0aa2ba2ebeadc02530e15c222306c7baa9b4330c
publish:
needs: check
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
env:
PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- if: env.PUSH == 'true'
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Scan what is about to publish, built for the runner's arch only; the multi-arch builds below reuse its cache.
- 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
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
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
- name: Sidecar image
id: sidecar
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
target: sidecar
platforms: linux/amd64,linux/arm64
push: ${{ env.PUSH }}
tags: |
ghcr.io/corbitsdev/corbits-triage-sidecar:main
ghcr.io/corbitsdev/corbits-triage-sidecar:${{ github.sha }}
cache-from: type=gha,scope=sidecar
cache-to: type=gha,scope=sidecar,mode=max
no-cache-filters: app
- name: Hub image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ env.PUSH }}
build-args: SIDECAR_IMAGE=ghcr.io/corbitsdev/corbits-triage-sidecar@${{ steps.sidecar.outputs.digest }}
tags: |
ghcr.io/corbitsdev/corbits-triage-hub:main
ghcr.io/corbitsdev/corbits-triage-hub:${{ github.sha }}
cache-from: type=gha,scope=hub
cache-to: type=gha,scope=hub,mode=max
no-cache-filters: app