From 08f1ca46942f27a61515a24959fe6732cfdab828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20J=C3=B6rg?= Date: Tue, 16 Jun 2026 12:32:23 +0200 Subject: [PATCH] fix: Use nix-shell for sed --- sr/action.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sr/action.yaml b/sr/action.yaml index af4054f..f1c1fa6 100644 --- a/sr/action.yaml +++ b/sr/action.yaml @@ -117,15 +117,15 @@ runs: shell: bash env: GITEA_TOKEN: ${{ inputs.gitea-token }} - GITEA_URL: ${{ inputs.gitea-url }} run: | - set -o pipefail - set -o nounset - set -o errexit - # Push as the real user behind GITEA_TOKEN, not the checkout's Actions token (uid -2). - repo_path="$(git remote get-url origin | sed -E 's#^https?://[^/]+/##')" - host="$(echo "$GITEA_URL" | sed -E 's#^https?://##; s#/$##')" - git remote set-url origin "https://oauth2:${GITEA_TOKEN}@${host}/${repo_path}" + nix-shell -p git gnused coreutils --run ' + set -o pipefail + set -o nounset + set -o errexit + # Push as the real user behind GITEA_TOKEN, not the checkout token (uid -2). + host_path="$(git remote get-url origin | sed -E "s#^https?://([^@]*@)?##")" + git remote set-url origin "https://oauth2:${GITEA_TOKEN}@${host_path}" + ' - name: Run semantic-release id: semantic