Compare commits
No commits in common. "e6488162c8085f2869f58bce06d452dbad8fcd47" and "c9837a6bd49f903ed12ee1b73decf8f5129aaaa5" have entirely different histories.
e6488162c8
...
c9837a6bd4
|
@ -1,50 +0,0 @@
|
||||||
name: Docker Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "master"
|
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish_api:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
-
|
|
||||||
name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: actions/docker-metadata-action@v4
|
|
||||||
with:
|
|
||||||
# list of Docker images to use as base name for tags
|
|
||||||
images: git.amogus.cloud/lea/maddy-admin
|
|
||||||
# generate Docker tags based on branch and short commit SHA
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=sha
|
|
||||||
-
|
|
||||||
name: Set up QEMU
|
|
||||||
uses: actions/docker-setup-qemu-action@v2
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: actions/docker-setup-buildx-action@v2
|
|
||||||
-
|
|
||||||
name: Login to registry
|
|
||||||
uses: actions/docker-login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.amogus.cloud
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
-
|
|
||||||
name: Build and push
|
|
||||||
uses: actions/docker-build-push-action@v3
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./api/Dockerfile
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
|
@ -1,5 +1,5 @@
|
||||||
import apiAuth from "@/lib/apiAuth";
|
import apiAuth from "@/lib/apiAuth";
|
||||||
import { auditLogRaw } from "@/lib/audit";
|
import { auditLog } from "@/lib/audit";
|
||||||
import { AliasEntry, createAliasEntry } from "@/lib/db";
|
import { AliasEntry, createAliasEntry } from "@/lib/db";
|
||||||
import { generateAliasEmail } from "@/lib/util-server";
|
import { generateAliasEmail } from "@/lib/util-server";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
|
@ -72,12 +72,7 @@ export async function POST(request: Request) {
|
||||||
temporary: true,
|
temporary: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
await auditLogRaw({
|
auditLog("createTempAlias", alias);
|
||||||
action: "createTempAlias",
|
|
||||||
ts: new Date().toISOString(),
|
|
||||||
data: alias,
|
|
||||||
user: user,
|
|
||||||
});
|
|
||||||
return NextResponse.json(alias);
|
return NextResponse.json(alias);
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in a new issue