Skip to content

Move withTransaction to dedicated models/tx module #588

Move withTransaction to dedicated models/tx module

Move withTransaction to dedicated models/tx module #588

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: 2.3.3
- run: npx @dotenvx/dotenvx run -f .env.ci -- deno task -r codegen
- run: npx @dotenvx/dotenvx run -f .env.ci -- deno task test
- run: deno task check
image:
needs: [test]
permissions:
contents: read
packages: write
attestations: write
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
runs-on: ${{ matrix.os }}
steps:
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- id: arch
run: |
set -ex
if [[ "$RUNNER_ARCH" = "ARM64" ]]; then
echo arch=arm64 >> "$GITHUB_OUTPUT"
else
echo arch=amd64 >> "$GITHUB_OUTPUT"
fi
- uses: docker/build-push-action@v6
with:
push: ${{ github.event_name == 'push' && 'true' || 'false' }}
build-args:
GIT_COMMIT=${{ github.sha }}
tags: ghcr.io/${{ github.repository }}:git-${{ github.sha }}-${{ steps.arch.outputs.arch }}
labels: |
org.opencontainers.image.revision=${{ github.sha }}
annotations: |
org.opencontainers.image.title=Hackers' Pub
org.opencontainers.image.description=ActivityPub-enabled social network for hackers
org.opencontainers.image.url=https://hackers.pub/
org.opencontainers.image.source=https://github.com/dahlia/hackerspub
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=AGPL-3.0-only
cache-from:
type=registry,ref=ghcr.io/${{ github.repository }}:build-cache-${{ steps.arch.outputs.arch }}
cache-to:
type=registry,ref=ghcr.io/${{ github.repository }}:build-cache-${{ steps.arch.outputs.arch }},mode=max
provenance: false
manifest:
if: github.event_name == 'push'
needs: [image]
permissions:
contents: read
packages: write
attestations: write
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: Noelware/[email protected]
with:
inputs: ghcr.io/${{ github.repository }}:git-${{ github.sha }},ghcr.io/${{ github.repository }}:latest
images: ghcr.io/${{ github.repository }}:git-${{ github.sha }}-amd64,ghcr.io/${{ github.repository }}:git-${{ github.sha }}-arm64
push: true