Read the tarball host and path from secrets, not variables
Run logs of a public repository are public, and Gitea prints variables in them in clear text; only secrets are masked. They are now set only on the publish step, the one step that needs them. Claude-Session: https://claude.ai/code/session_01GGe7kUhooMFuzY6GaDb2w9
This commit is contained in:
@@ -32,8 +32,6 @@ concurrency:
|
|||||||
# host, state.json or the AUR.
|
# host, state.json or the AUR.
|
||||||
env:
|
env:
|
||||||
AUR_MAINTAINER: ${{ vars.AUR_MAINTAINER }}
|
AUR_MAINTAINER: ${{ vars.AUR_MAINTAINER }}
|
||||||
TARBALL_HOST: ${{ vars.TARBALL_HOST }}
|
|
||||||
TARBALL_PATH: ${{ vars.TARBALL_PATH }}
|
|
||||||
TARBALL_BASE_URL: ${{ vars.TARBALL_BASE_URL }}
|
TARBALL_BASE_URL: ${{ vars.TARBALL_BASE_URL }}
|
||||||
WORK_DIR: /work
|
WORK_DIR: /work
|
||||||
|
|
||||||
@@ -126,6 +124,10 @@ jobs:
|
|||||||
if: vars.PUBLISH == 'true'
|
if: vars.PUBLISH == 'true'
|
||||||
env:
|
env:
|
||||||
TARBALL_SSH_KEY: ${{ secrets.TARBALL_SSH_KEY }}
|
TARBALL_SSH_KEY: ${{ secrets.TARBALL_SSH_KEY }}
|
||||||
|
# Secrets, not variables: run logs of a public repo are public, and
|
||||||
|
# Gitea prints variables in them but masks secrets.
|
||||||
|
TARBALL_HOST: ${{ secrets.TARBALL_HOST }}
|
||||||
|
TARBALL_PATH: ${{ secrets.TARBALL_PATH }}
|
||||||
run: |
|
run: |
|
||||||
ASSET="$(python3 -c 'import json;print(json.load(open("release-meta.json"))["tarball"])')"
|
ASSET="$(python3 -c 'import json;print(json.load(open("release-meta.json"))["tarball"])')"
|
||||||
bash scripts/publish-tarball.sh "${WORK_DIR}/out/${ASSET}"
|
bash scripts/publish-tarball.sh "${WORK_DIR}/out/${ASSET}"
|
||||||
|
|||||||
@@ -96,8 +96,6 @@ Set these in the Gitea repo before the first run.
|
|||||||
| Name | Example | Meaning |
|
| Name | Example | Meaning |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `AUR_MAINTAINER` | `Asger Geel Weirsoe <asger at weircon dot dk>` | Written into the PKGBUILD header. The guidelines suggest obfuscating the address against spam harvesting. |
|
| `AUR_MAINTAINER` | `Asger Geel Weirsoe <asger at weircon dot dk>` | Written into the PKGBUILD header. The guidelines suggest obfuscating the address against spam harvesting. |
|
||||||
| `TARBALL_HOST` | `files.example.org` | SSH host the tarballs are uploaded to |
|
|
||||||
| `TARBALL_PATH` | `/path/to/tarballs` | Directory on that host that the web server publishes |
|
|
||||||
| `TARBALL_BASE_URL` | `https://asger.weirsoe.dk/tarballz` | Public URL the PKGBUILD downloads from |
|
| `TARBALL_BASE_URL` | `https://asger.weirsoe.dk/tarballz` | Public URL the PKGBUILD downloads from |
|
||||||
| `PUBLISH` | `true` | Master switch. Unless it is `true`, a run only builds and verifies, leaving the tarball in the `jasp-build` volume under `out/`: no upload, no `state.json` commit, no AUR push. |
|
| `PUBLISH` | `true` | Master switch. Unless it is `true`, a run only builds and verifies, leaving the tarball in the `jasp-build` volume under `out/`: no upload, no `state.json` commit, no AUR push. |
|
||||||
|
|
||||||
@@ -106,6 +104,8 @@ Set these in the Gitea repo before the first run.
|
|||||||
| Name | Meaning |
|
| Name | Meaning |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `GH_TOKEN` | *Optional.* A GitHub PAT, passed to the build as `GITHUB_PAT`. Not used for publishing — several JASP R modules install from GitHub and anonymous API rate limits can fail the build. |
|
| `GH_TOKEN` | *Optional.* A GitHub PAT, passed to the build as `GITHUB_PAT`. Not used for publishing — several JASP R modules install from GitHub and anonymous API rate limits can fail the build. |
|
||||||
|
| `TARBALL_HOST` | SSH host the tarballs are uploaded to. A secret rather than a variable: run logs of a public repo are public, and Gitea prints variables in them. |
|
||||||
|
| `TARBALL_PATH` | Directory on that host that the web server publishes. A secret for the same reason. |
|
||||||
| `TARBALL_SSH_KEY` | Private key authorised on `TARBALL_HOST` for uploading tarballs |
|
| `TARBALL_SSH_KEY` | Private key authorised on `TARBALL_HOST` for uploading tarballs |
|
||||||
| `AUR_SSH_PRIVATE_KEY` | Private SSH key registered with your AUR account. Copy the value already set on `agw/pi3-smart-workspace`. |
|
| `AUR_SSH_PRIVATE_KEY` | Private SSH key registered with your AUR account. Copy the value already set on `agw/pi3-smart-workspace`. |
|
||||||
| `STATE_PUSH_TOKEN` | Gitea token with write access to this repo, for committing `state.json`. (Gitea reserves the `GITEA_` secret prefix.) |
|
| `STATE_PUSH_TOKEN` | Gitea token with write access to this repo, for committing `state.json`. (Gitea reserves the `GITEA_` secret prefix.) |
|
||||||
|
|||||||
Reference in New Issue
Block a user