neiam
/neiam-portal
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
Say why the publish step failed
297fe1b · Gabriel Morell · 2026-09-16 19:22
Message
{commit_body(@commit)}
Files changed
modified
.forgejo/workflows/publish.yml
+28
−11
@@ -16,21 +16,26 @@ jobs:
| 16 | 16 | publish: |
| 17 | 17 | runs-on: self-hosted |
| 18 | 18 | |
| 19 | − env: | |
| 19 | + steps: | |
| 20 | + - uses: actions/checkout@v4 | |
| 21 | + | |
| 22 | + # Through $GITHUB_ENV rather than a job-level `env:` block: every value | |
| 23 | + # in this file travels that way, so there is one mechanism to trust | |
| 24 | + # instead of two. | |
| 25 | + # | |
| 20 | 26 | # `cargo publish` needs a host toolchain and nothing else — no ESP |
| 21 | 27 | # anything, since esp-idf-svc is target-scoped in Cargo.toml and a host |
| 22 | − # build compiles only the pure modules. | |
| 23 | − # | |
| 24 | − # Installed here rather than taken from a `container:` image, because the | |
| 25 | − # runner executes JavaScript actions with node inside the job container | |
| 26 | − # and `rust:1.90-bookworm` has no node: `actions/checkout@v4` would die | |
| 28 | + # build compiles only the pure modules. It is installed with rustup | |
| 29 | + # rather than taken from a `container:` image, because the runner | |
| 30 | + # executes JavaScript actions with node inside the job container and | |
| 31 | + # `rust:1.90-bookworm` has no node: `actions/checkout@v4` would die | |
| 27 | 32 | # before this workflow started. (lambent-flex-c6 hits the same wall from |
| 28 | 33 | # the other side; see its firmware.yml.) |
| 29 | − RUST_VERSION: "1.90.0" | |
| 30 | − REGISTRY_NAME: neiam-portal | |
| 31 | − | |
| 32 | − steps: | |
| 33 | − - uses: actions/checkout@v4 | |
| 34 | + - name: Settings | |
| 35 | + run: | | |
| 36 | + set -euo pipefail | |
| 37 | + echo "RUST_VERSION=1.90.0" >> "$GITHUB_ENV" | |
| 38 | + echo "REGISTRY_NAME=neiam-portal" >> "$GITHUB_ENV" | |
| 34 | 39 | |
| 35 | 40 | - name: Resolve the forge URL |
| 36 | 41 | env: |
@@ -98,6 +103,18 @@ jobs:
| 98 | 103 | run: | |
| 99 | 104 | set -euo pipefail |
| 100 | 105 | |
| 106 | + # Run #2 failed here in one second and said nothing about why. The | |
| 107 | + # two candidates — an empty registry name and a missing token — | |
| 108 | + # both fail that fast, so name them rather than guess again. The | |
| 109 | + # token is reported by length, never by value. | |
| 110 | + : "${REGISTRY_NAME:?registry name is empty}" | |
| 111 | + : "${CARGO_HOME:?cargo home is unset}" | |
| 112 | + echo "registry=$REGISTRY_NAME ref_type=${GITHUB_REF_TYPE:-<unset>} ref=${GITHUB_REF_NAME:-<unset>}" | |
| 113 | + token=${CARGO_REGISTRIES_NEIAM_PORTAL_TOKEN:-} | |
| 114 | + echo "token: ${#token} chars" | |
| 115 | + echo "config: $CARGO_HOME/config.toml" | |
| 116 | + grep -A 1 "registries" "$CARGO_HOME/config.toml" || echo " (no registry stanza!)" | |
| 117 | + | |
| 101 | 118 | if [ "${GITHUB_REF_TYPE:-branch}" = "tag" ]; then |
| 102 | 119 | cargo publish --registry "$REGISTRY_NAME" |
| 103 | 120 | echo |
Parents: f1c3bee