Skip to content
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
71 changes: 43 additions & 28 deletions .github/workflows/publish-wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,57 @@ name: Publish Wiki
on:
workflow_dispatch:


jobs:
Update-Wiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: update wiki data
- uses: actions/checkout@v3
- name: Get latest release tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
if [ -z "$RELEASE_TAG" ] || [ "$RELEASE_TAG" = "null" ]; then
echo "Error: No release found. Exiting immediately!"
exit 1
fi
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
echo "Debug RELEASE_TAG: $RELEASE_TAG"
- name: Compute Docker tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DOCKER_TAG=$(gh api /orgs/naftiko/packages/container/framework/versions \
--jq '[.[] | select(.metadata.container.tags[] | startswith("sha-"))] | .[0].metadata.container.tags[] | select(startswith("sha-"))' \
2>/dev/null || echo "latest")
echo "DOCKER_TAG=$DOCKER_TAG" >> $GITHUB_ENV
- name: Update wiki data
env:
GH_WIKI_PUBLISH_TOKEN: ${{ secrets.GH_WIKI_PUBLISH_TOKEN }}
WIKI_DIR: src/main/resources/wiki
run: |
echo $GITHUB_ACTOR
WIKI_COMMIT_MESSAGE='Automatically publish wiki'
GIT_REPOSITORY_URL="https://${GH_WIKI_PUBLISH_TOKEN}@${GITHUB_SERVER_URL#https://}/$GITHUB_REPOSITORY.wiki.git"

echo "Checking out wiki repository"
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
(
cd "$tmp_dir" || exit 1
git init
git config user.name $GITHUB_ACTOR
git config user.email $GITHUB_ACTOR@users.noreply.github.com
git pull "$GIT_REPOSITORY_URL"
echo "Removing Files, ensuring deletion."
rm -r -f ./*
) || exit 1

echo "Copying contents of $WIKI_DIR"
cp -R $WIKI_DIR/. "$tmp_dir"

echo "Committing and pushing changes"
(
cd "$tmp_dir" || exit 1
git add .
git commit -m "$WIKI_COMMIT_MESSAGE"
git push --set-upstream "$GIT_REPOSITORY_URL" master
) || exit 1

rm -rf "$tmp_dir"
tmp_dir=$(mktemp -d)

echo "Cloning wiki"
git clone "$GIT_REPOSITORY_URL" "$tmp_dir"

rm -rf "$tmp_dir"/*

echo "Copying files"
cp -R "$WIKI_DIR"/. "$tmp_dir"

echo "Replacing release tag and docker tag"
find "$tmp_dir" -name "*.md" -exec sed -i \
-e "s|{{RELEASE_TAG}}|$RELEASE_TAG|g" \
-e "s|{{DOCKER_TAG}}|$DOCKER_TAG|g" {} +

cd "$tmp_dir"
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

git add .
git commit -m "$WIKI_COMMIT_MESSAGE" || echo "No changes"
git push
12 changes: 6 additions & 6 deletions src/main/resources/wiki/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ To use Naftiko Framework, you must install and then run its engine.
### Pull Naftiko's Docker image
* Naftiko provides a docker image hosted in GitHub packages platform. It is public, so you can easily pull it locally.
```bash
# v1.0.0-alpha1
docker pull ghcr.io/naftiko/framework:sha-770e515
# {{RELEASE_TAG}}
docker pull ghcr.io/naftiko/framework:{{DOCKER_TAG}}

# If you want to play with the last snapshot
docker pull ghcr.io/naftiko/framework:latest
Expand Down Expand Up @@ -63,7 +63,7 @@ For the moment, CLI is only provided for Apple Silicon (with M chip).
**Apple Silicon (M1/M2/M3/M4):**
```bash
# Download the binary
curl -L https://github.com/naftiko/framework/releases/download/v1.0.0-alpha1/naftiko-cli-macos-arm64 -o naftiko
curl -L https://github.com/naftiko/framework/releases/download/{{RELEASE_TAG}}/naftiko-cli-macos-arm64 -o naftiko

# Set binary as executable
chmod +x naftiko
Expand All @@ -77,7 +77,7 @@ sudo mv naftiko /usr/local/bin/
### Linux
```bash
# Download the binary
curl -L https://github.com/naftiko/framework/releases/download/v1.0.0-alpha1/naftiko-cli-linux-amd64 -o naftiko
curl -L https://github.com/naftiko/framework/releases/download/{{RELEASE_TAG}}/naftiko-cli-linux-amd64 -o naftiko

# Set binary as executable
chmod +x naftiko
Expand All @@ -94,7 +94,7 @@ PowerShell installation is recommended.
New-Item -ItemType Directory -Force -Path "C:\Program Files\Naftiko"

# Download the binary
Invoke-WebRequest -Uri "https://github.com/naftiko/framework/releases/download/v1.0.0-alpha1/naftiko-cli-windows-amd64.exe" -OutFile "C:\Program Files\Naftiko\naftiko.exe"
Invoke-WebRequest -Uri "https://github.com/naftiko/framework/releases/download/{{RELEASE_TAG}}/naftiko-cli-windows-amd64.exe" -OutFile "C:\Program Files\Naftiko\naftiko.exe"

# Add to the system PATH
$oldPath = [Environment]::GetEnvironmentVariable('Path', 'Machine')
Expand Down Expand Up @@ -133,4 +133,4 @@ By default, validation is performed on the latest schema version. If you want to
# Validate the capability configuration file with the schema v0.5
naftiko validate path_to_your_capability_file 0.5
```
The result will tell you if the file is valid or if there are any errors.
The result will tell you if the file is valid or if there are any errors.
6 changes: 3 additions & 3 deletions src/main/resources/wiki/Specification-‐-Rules.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Naftiko Specification - Rules

Version: 1.0.0-alpha1
Version: {{RELEASE_TAG}}
Category: Tooling
Last updated: March 2026

Expand Down Expand Up @@ -30,7 +30,7 @@ It is intentionally **complementary** to the JSON Schema, not a duplicate of it:
- JSON Schema enforces structural validity and required fields.
- Spectral enforces cross-object consistency, style hygiene, and security hygiene.

The current ruleset supports both document shapes allowed by Naftiko v0.5:
The current ruleset supports both document shapes allowed by Naftiko {{RELEASE_TAG}}:

1. Full capability documents (`naftiko` + `capability`, optionally root `consumes`)
2. Shared consumes documents (`naftiko` + root `consumes`, without `capability`)
Expand Down Expand Up @@ -224,4 +224,4 @@ These rules reduce injection risk in rendered documentation/UIs.
## Notes

- This page documents the current lean ruleset and intentionally does not list schema-duplicated checks.
- For mandatory structure/required fields, rely on `src/main/resources/schemas/naftiko-schema.json`.
- For mandatory structure/required fields, rely on `src/main/resources/schemas/naftiko-schema.json`.
2 changes: 1 addition & 1 deletion src/main/resources/wiki/Specification-‐-Schema.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Naftiko Specification - Schema

**Version:** 1.0.0-alpha1
**Version:** {{RELEASE_TAG}}

**Publication Date:** March 2026

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/wiki/Tutorial-‐-Part-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The Maritime Registry at `registry.shipyard.dev` has a REST endpoint: `GET /ship
A capability needs two things: something to **consume** (the API) and something to **expose** (the tool).

```yaml
naftiko: "1.0.0-alpha1"
naftiko: "{{RELEASE_TAG}}"

capability:
consumes:
Expand Down Expand Up @@ -421,4 +421,4 @@ All from one spec. No code. Welcome to Spec-Driven Integration.

Ready to expose your tools as **agent skills**, add a **REST front door**, and assemble a full **Fleet Manifest** with multi-step orchestration?

Continue with the [Tutorial - Part 2](Tutorial-%E2%80%90-Part-2).
Continue with the [Tutorial - Part 2](Tutorial-%E2%80%90-Part-2).
Loading