From 8b48af1a961cd2466061f5ae764866c10ffea26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20H=C3=A5rek=20Andreassen?= Date: Sat, 20 Apr 2024 10:56:40 +0200 Subject: [PATCH 1/2] docs: Add SourceHut builds example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim HĂ„rek Andreassen --- website/docs/sourcehut.md | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 website/docs/sourcehut.md diff --git a/website/docs/sourcehut.md b/website/docs/sourcehut.md new file mode 100644 index 0000000000..ff29c4156b --- /dev/null +++ b/website/docs/sourcehut.md @@ -0,0 +1,43 @@ +--- +sidebar_position: 11 +--- + +# Sourcehut Builds + +It is possible to generate changelogs using [SourceHut builds](https://builds.sr.ht). + +```yaml +image: alpine/edge +packages: + - git-cliff +secrets: + - +sources: + - git://git@git.sr.ht:~/ +environment: + dir: + source: +tasks: + - git-cliff: | + cd $dir + cd $dir + git cliff -o CHANGELOG.md + ssh-keyscan -t rsa git.sr.ht >> ~/.ssh/known_hosts + git remote set-url origin $source + git checkout main + git add CHANGELOG.md + git commit -m "chore(release): Update CHANGELOG" + git push -o skip-ci +``` + +1. Generate a new SSH-key for SourceHut builds: + `ssh-keygen -t ed25519 -C "builds.sr.ht" -f ~/.ssh/builds-srht` +1. Add the newly generated public key to your + [SourceHut account](https://meta.sr.ht/keys). +1. Add the private key as a secret to your + [Sourcehut Builds](https://builds.sr.ht/secrets). +1. Replace all the placeholders in you `.build.yml`: + - `` + - `` + - `` + - `` From 8a5a446327ac1e247a612f47c1c69e1887507ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sat, 20 Apr 2024 17:53:42 +0300 Subject: [PATCH 2/2] docs: polish SourceHut docs --- website/docs/sourcehut.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/sourcehut.md b/website/docs/sourcehut.md index ff29c4156b..d903e537f3 100644 --- a/website/docs/sourcehut.md +++ b/website/docs/sourcehut.md @@ -32,11 +32,11 @@ tasks: 1. Generate a new SSH-key for SourceHut builds: `ssh-keygen -t ed25519 -C "builds.sr.ht" -f ~/.ssh/builds-srht` -1. Add the newly generated public key to your +2. Add the newly generated public key to your [SourceHut account](https://meta.sr.ht/keys). -1. Add the private key as a secret to your +3. Add the private key as a secret to your [Sourcehut Builds](https://builds.sr.ht/secrets). -1. Replace all the placeholders in you `.build.yml`: +4. Replace all the placeholders in your `.build.yml`: - `` - `` - ``