diff --git a/.gitea/workflows/custom-release.yml b/.gitea/workflows/custom-release.yml index 2887a6fb9..8923eafea 100644 --- a/.gitea/workflows/custom-release.yml +++ b/.gitea/workflows/custom-release.yml @@ -47,6 +47,7 @@ jobs: run: | go install code.gitea.io/tea@v0.14.1 echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" + "$(go env GOPATH)/bin/tea" logins delete actions >/dev/null 2>&1 || true "$(go env GOPATH)/bin/tea" logins add --name actions --url https://git.felixfoertsch.de --token "$GITEA_TOKEN" --no-version-check env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} diff --git a/scripts/tests/test-custom-release-macos-runner.bats b/scripts/tests/test-custom-release-macos-runner.bats index 3186cca8a..56ecc4f3a 100644 --- a/scripts/tests/test-custom-release-macos-runner.bats +++ b/scripts/tests/test-custom-release-macos-runner.bats @@ -17,6 +17,14 @@ setup() { [ "$status" -ne 0 ] } +@test "custom release tea login setup is idempotent on persistent host runner" { + run rg -n 'tea" logins delete actions >/dev/null 2>&1 \|\| true' "$WORKFLOW" + [ "$status" -eq 0 ] + + run rg -n 'tea" logins add --name actions' "$WORKFLOW" + [ "$status" -eq 0 ] +} + @test "custom release workflow imports developer id signing material into temporary keychain" { run rg -n 'DEVELOPER_ID_APPLICATION_P12_BASE64' "$WORKFLOW" [ "$status" -eq 0 ]