Skip to content

CI: publish to Hex from the hex environment - #125

Merged
nyo16 merged 1 commit into
masterfrom
ci-hex-environment
Nov 8, 2026
Merged

nyo16 merged 1 commit into
masterfrom
ci-hex-environment

Conversation

@nyo16

@nyo16 nyo16 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Moves the Hex key out of repository secrets, as in nyo16/nous (cbf93f2, 1ae48a7).

  • publish declares environment: hex and is the only job that can read HEX_API_KEY. The environment accepts v* tags only and needs a reviewer, so a tag push pauses before anything reaches Hex until it is approved.
  • The precompile and publish checkouts use persist-credentials: false. publish's git fetch origin master is anonymous; the repository is public. checksum keeps its token because it pushes checksum.exs to master.
  • The workflow defaults to permissions: contents: read. Every job already set its own.
  • docs/release-guide.md documents the approval step, and the change is in the v0.8.68 changelog.

Before merging (repo settings, needs admin):

  1. Settings → Environments → New environment hex. Add yourself as a required reviewer. Turn off admin bypass. Under deployment branches and tags choose Selected, then add a tag rule v*.
  2. Add an environment secret HEX_API_KEY to hex.
  3. Delete the repository secret HEX_API_KEY.

Until step 3 is done, a job in the environment without its own secret falls back to the repository secret. So publishing works at every point of the switch.

actionlint is clean apart from SC2155 on the Metal minos check, which is already on master.

HEX_API_KEY moves from repo secrets to a hex environment that only the
publish job declares (v* tags only, required reviewer). The precompile and
publish checkouts drop the persisted git token, and the workflow defaults to
contents: read. Same setup as nyo16/nous (cbf93f2, 1ae48a7).
@nyo16
nyo16 merged commit 63a8ea2 into master Nov 8, 2026
9 checks passed
@nyo16
nyo16 deleted the ci-hex-environment branch November 8, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant