Skip to content

Commit

Permalink
project trans wkd initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryolitia committed Aug 9, 2024
1 parent 7a040d2 commit e1274d1
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 45 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Update"
on:
workflow_dispatch:
push:
branches:
- main
- master

permissions:
contents: write

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false

- name: Setup Git
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
git show -s
- name: Update OpenPGP
run: |
make
- name: Commit change
continue-on-error: true
run: |
set +e
git add .
git status
git commit -m "openpgp: update at $(date +'%Y-%m-%dT%H:%M:%S')"
git push
7 changes: 0 additions & 7 deletions .well-known/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions .well-known/make.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p "python3.withPackages (ps: with ps; [ ])" -p gnupg

import sys
import json
import os

if __name__ == "__main__":
with open(sys.argv[1]) as f:
data = json.load(f)
print(data)
for key, value in data.items():
for fingerprint in value:
os.system(f"gpg --recv-keys {fingerprint}")
os.system(f"pwd")
os.system(f"gpg --list-options show-only-fpr-mbox -k {fingerprint} | gpg-wks-client -v --install-key")
Binary file not shown.
1 change: 0 additions & 1 deletion .well-known/openpgpkey/aosc.io/policy

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion .well-known/openpgpkey/coelacanthus.moe/policy

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion .well-known/openpgpkey/gmail.com/policy

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion .well-known/openpgpkey/outlook.com/policy

This file was deleted.

2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
openpgpkey.coelacanthus.moe
openpgpkey.project-trans.org
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
MAKE = make
RM = rm -rf
all: clean index.html generate-WKD

.PHONY: generate-WKD
generate-WKD:
$(MAKE) -C .well-known generate-WKD
mkdir -p ./.well-known/openpgpkey
cd ./.well-known && ./make.py ../staffs.json

index.html: index.md
pandoc -c style.css --self-contained index.md -o index.html --to=html5 --metadata title="Web Key Directory of Coelacanthus" -V lang=en-US
nix run nixpkgs#pandoc -- -c style.css --embed-resources --standalone index.md -o index.html --to=html5 --metadata title="Web Key Directory of Project Trans" -V lang=en-US

.PHONY: clean
clean:
$(RM) index.html
rm -rf index.html
rm -rf ./.well-known/openpgpkey
28 changes: 0 additions & 28 deletions index.html

This file was deleted.

11 changes: 11 additions & 0 deletions staffs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"CoelacanthusHex": [
"892ebc7dc392dff9c9c03f1d15f4180e73787863"
],
"Cryolitia": [
"1c3c6547538d7152310c0eea84dd0c0130a54df7"
],
"saeziae": [
"cedba39e576bc6c21b71a64825e82bbea32bd476"
]
}

0 comments on commit e1274d1

Please sign in to comment.