fix: default to the job token; isolate tests from the job env
test / test (push) Successful in 6s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Paul Hitt
2026-10-13 14:03:47 -04:00
co-authored by Claude Opus 5.5
parent 9c9a583974
commit a5b65dd406
3 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -32,7 +32,6 @@ Deploy repo, after the deploy job:
with: { fetch-depth: 0 }
- uses: https://git.extant2000.com/extant2000/ci-shared/release@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
image: git.extant2000.com/extant2000/<image>
registry-token: ${{ secrets.REGISTRY_TOKEN }}
```
@@ -42,11 +41,10 @@ Library, after the tests:
```yaml
- uses: https://git.extant2000.com/extant2000/ci-shared/release@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN }}
```
`RELEASE_TOKEN` is an org secret (extant2000git, write:repository). Outputs:
The job token (`gitea.token`) creates the tag and the release; no extra secret. Outputs:
`released`, `version`, `tag`, `previous`.
## Versioning
+3 -3
View File
@@ -5,8 +5,8 @@ description: >
pushes IMAGE:vX.Y.Z and publishes the npm package as X.Y.Z.
inputs:
token:
description: Gitea token that can create tags and releases in this repo.
required: true
description: Gitea token that can create tags and releases in this repo (the job token can).
default: ${{ github.token }}
sha:
description: Commit to release.
default: ${{ github.sha }}
@@ -50,7 +50,7 @@ runs:
- id: release
shell: bash
env:
RELEASE_TOKEN: ${{ inputs.token }}
RELEASE_TOKEN: ${{ inputs.token || github.token }}
SHA: ${{ inputs.sha }}
INITIAL_VERSION: ${{ inputs.initial-version }}
VERSION_FILE: ${{ inputs.version-file }}
+1 -1
View File
@@ -9,7 +9,7 @@ export GIT_AUTHOR_NAME=t GIT_AUTHOR_EMAIL=t@example.com GIT_COMMITTER_NAME=t GIT
repo() { D=$(mktemp -d); cd "$D" && git init -q -b main && git commit -q --allow-empty -m "chore: init"; }
c() { git commit -q --allow-empty -m "$1"; }
run() { ( unset GITHUB_OUTPUT; DRY_RUN=1 SKIP_FETCH=1 GITHUB_REPOSITORY=o/r "$@" bash "$SCRIPT" 2>"$D/.err" ); }
run() { ( unset GITHUB_OUTPUT GITHUB_SHA SHA GITHUB_REPOSITORY; DRY_RUN=1 SKIP_FETCH=1 GITHUB_REPOSITORY=o/r "$@" bash "$SCRIPT" 2>"$D/.err" ); }
expect() { # name expected-released expected-version [env...]
local name=$1 rel=$2 ver=$3 out; shift 3
out=$(run env "$@")