Skip to content

ci: fix the Update wiki and Build workflows of the wiki branch - #1694

Open
NRGLine4Sec wants to merge 2 commits into
evilsocket:wikifrom
NRGLine4Sec:wiki-ci
Open

NRGLine4Sec wants to merge 2 commits into
evilsocket:wikifrom
NRGLine4Sec:wiki-ci

Conversation

@NRGLine4Sec

Copy link
Copy Markdown
Contributor

This fixes the two workflows of the wiki branch, which fail on every pull request to it (#1600 had both failures, and so does #1693).

Update wiki

  • mv -f wiki/* opensnitch.wiki/ cannot replace a directory that already exists in the wiki. Today the wiki has no directory, but wiki: document inbound port scan detection #1693 adds wiki/images/: once it is merged, the next push to wiki would fail with mv: cannot overwrite 'opensnitch.wiki/images': Directory not empty, and so would every push after it, whatever page it changes. The pages are now copied with cp -R wiki/. opensnitch.wiki/, which updates existing directories.
  • On a pull request, the job clones the wiki and applies the changes but does not push. A pull request from a fork only gets a read-only token, so the push always failed there with a 403; from a branch of this repository, it would have published the pages before the merge. The clone and the git status still show whether the change applies.
  • The push only runs for pushes to wiki in evilsocket/opensnitch, so a fork's own pushes no longer try to write to this wiki.
  • A push that changes nothing in the wiki no longer fails on an empty git commit.
  • Two merges in a row are queued instead of pushing to the wiki at the same time.
  • actions/checkout@v2 becomes @v4, and the workflow file itself is part of the trigger paths.

Build

The job stops at its actions/setup-go@v1 step (Go 1.13) on current GitHub runners. The job now uses actions/setup-go@v5 with Go 1.23, the version used by master, and builds with -mod=mod because this branch has no go.sum. Changes under wiki/ cannot affect the build, so they no longer trigger it.

Checked

  • Both files pass actionlint with shellcheck.
  • The daemon of this branch builds with Go 1.23.0 and -mod=mod (without -mod=mod it stops on missing go.sum entry).
  • The update script was replayed against a local copy of the wiki: applying wiki: document inbound port scan detection #1693 (12 files, images/ created), then the same content again with images/ present ("already up to date", no failure), then a page edit plus a new image (2 files changed). The original mv fails on the second case.

This PR and #1693 can be merged in either order. Without this one, the first change to the wiki after #1693 fails.

🤖 Generated with Claude Code

NRGLine4Sec and others added 2 commits October 18, 2026 16:22
mv cannot replace a directory that already exists in the destination,
so the first push after images/ reaches the wiki would fail, and every
push after it. Copy the pages instead.

On pull requests, apply the changes to a clone of the wiki without
pushing: a pull request from a fork only gets a read-only token, so
the push always failed there. Pushes from forks are skipped too, a
push with nothing to change no longer fails on an empty commit, and
two merges in a row no longer push at the same time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The job stopped at its actions/setup-go@v1 step (Go 1.13) on current
GitHub runners, so it failed on every pull request, wiki changes
included. Use the Go version of master, and allow the build to write
the go.sum this branch does not have. Changes under wiki/ cannot
affect the build and no longer trigger it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant