Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use GHAct #3

Merged
merged 12 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
"run",
"--v8-flags=--max-old-space-size=8000",
"--inspect",
"--allow-net", "--allow-read", "--allow-write", "--allow-run=git", "--allow-env"
"--allow-net",
"--allow-read",
"--allow-write",
"--allow-run=git",
"--allow-env"
],
"attachSimplePort": 9229
}
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM denoland/deno:ubuntu-1.22.1
FROM denoland/deno:1.43.3

# Install cron
RUN apt-get update
RUN apt-get install -y git
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git

# The port that your application listens to.
EXPOSE 4505
Expand All @@ -14,8 +14,8 @@ WORKDIR /app

# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
# Ideally cache deps.ts will download and compile _all_ external files used in main.ts.
COPY src/deps.ts .
RUN deno cache deps.ts
COPY src/deps.ts src/deps.ts
RUN deno cache src/deps.ts

# These steps will be re-run upon each file change in your working directory:
ADD src src
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Turtle-Hook

This updates a SPARQL-Endpoint to reflect the changes of the content of RDF-Turtle files in a Github repository.

It uses [ghact](https://deno.land/x/ghact) to provide a webhook and a web/rest interface.
18 changes: 14 additions & 4 deletions config/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
export const config = {
branch: "main",
import { type Config } from "../src/deps.ts";

export const sparqlConfig = {
graphUriPrefix: "https://raw.githubusercontent.com/plazi/treatments-rdf/main",
repository: "plazi/treatments-rdf",
repositoryUri: "https://github.com/plazi/treatments-rdf.git",
uploadUri: "http://blazegraph:8080/blazegraph/sparql",
};

export const ghActConfig: Config = {
title: "Turtle-Hook",
description: "Load RDF from plazi/treatments-rdf into our triple-store.",
// we don't create commits, so a default job-author is not really neccesary
email: "",
sourceRepositoryUri: "https://github.com/plazi/treatments-rdf.git",
sourceBranch: "main",
sourceRepository: "plazi/treatments-rdf",
workDir: "/workdir",
};
52 changes: 0 additions & 52 deletions config/postupdate.sparql

This file was deleted.

215 changes: 0 additions & 215 deletions manual-test.ts

This file was deleted.

10 changes: 5 additions & 5 deletions src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export {
Server,
Status,
STATUS_TEXT,
} from "https://deno.land/[email protected]/http/mod.ts";
export { serveDir } from "https://deno.land/[email protected]/http/file_server.ts";
type Config,
GHActServer,
GHActWorker,
type Job,
} from "https://deno.land/x/[email protected]/mod.ts";
Loading
Loading