You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): hoist secrets to job env in mirror-reusable; refresh example SHAs
mirror-reusable.yml (two real bugs):
- Remove duplicate `if:` key on the "Mirror to GitLab" step.
- The `secrets` context is not valid in step-level `if:` (it is an
"Unrecognized named-value: 'secrets'" startup failure). Hoist each
forge secret to a job-level `env:` block and gate every step `if:` on
`env.<FORGE>_KEY` instead of `secrets.<FORGE>_SSH_KEY`, matching the
already-correct `mirror-radicle` pattern. Applies to all six forge
jobs (gitlab, bitbucket, codeberg, sourcehut, disroot, gitea).
Behaviour identical; only the reference site moves. actionlint clean.
{elixir,deno,rust,changelog}-*-reusable.yml:
- Refresh the stale copy-paste example SHA in the header comments
(861b5e9 -> 4762ba6, current main HEAD) so new adopters copy a
current pin. Comment-only.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
echo "::notice::GITLAB_MIRROR_ENABLED=true but secrets.GITLAB_SSH_KEY is empty. Skipping GitLab mirror. Configure the GITLAB_SSH_KEY org/repo secret to enable."
79
84
80
85
mirror-bitbucket:
81
86
timeout-minutes: 20
82
87
runs-on: ${{ inputs.runs-on }}
83
88
if: vars.BITBUCKET_MIRROR_ENABLED == 'true'
89
+
# See mirror-gitlab: the `secrets` context is not valid in step `if:`;
90
+
# hoist to job-level `env` and gate steps on `env.BITBUCKET_KEY`.
- name: Skipped (BITBUCKET_SSH_KEY not configured)
99
-
if: ${{ secrets.BITBUCKET_SSH_KEY == '' }}
108
+
if: ${{ env.BITBUCKET_KEY == '' }}
100
109
run: |
101
110
echo "::notice::BITBUCKET_MIRROR_ENABLED=true but secrets.BITBUCKET_SSH_KEY is empty. Skipping Bitbucket mirror. Configure the BITBUCKET_SSH_KEY org/repo secret to enable."
102
111
103
112
mirror-codeberg:
104
113
timeout-minutes: 20
105
114
runs-on: ${{ inputs.runs-on }}
106
115
if: vars.CODEBERG_MIRROR_ENABLED == 'true'
116
+
# See mirror-gitlab: the `secrets` context is not valid in step `if:`;
117
+
# hoist to job-level `env` and gate steps on `env.CODEBERG_KEY`.
echo "::notice::CODEBERG_MIRROR_ENABLED=true but secrets.CODEBERG_SSH_KEY is empty. Skipping Codeberg mirror. Configure the CODEBERG_SSH_KEY org/repo secret to enable."
125
138
126
139
mirror-sourcehut:
127
140
timeout-minutes: 20
128
141
runs-on: ${{ inputs.runs-on }}
129
142
if: vars.SOURCEHUT_MIRROR_ENABLED == 'true'
143
+
# See mirror-gitlab: the `secrets` context is not valid in step `if:`;
144
+
# hoist to job-level `env` and gate steps on `env.SOURCEHUT_KEY`.
- name: Skipped (SOURCEHUT_SSH_KEY not configured)
145
-
if: ${{ secrets.SOURCEHUT_SSH_KEY == '' }}
162
+
if: ${{ env.SOURCEHUT_KEY == '' }}
146
163
run: |
147
164
echo "::notice::SOURCEHUT_MIRROR_ENABLED=true but secrets.SOURCEHUT_SSH_KEY is empty. Skipping SourceHut mirror. Configure the SOURCEHUT_SSH_KEY org/repo secret to enable."
148
165
149
166
mirror-disroot:
150
167
timeout-minutes: 20
151
168
runs-on: ${{ inputs.runs-on }}
152
169
if: vars.DISROOT_MIRROR_ENABLED == 'true'
170
+
# See mirror-gitlab: the `secrets` context is not valid in step `if:`;
171
+
# hoist to job-level `env` and gate steps on `env.DISROOT_KEY`.
echo "::notice::DISROOT_MIRROR_ENABLED=true but secrets.DISROOT_SSH_KEY is empty. Skipping Disroot mirror. Configure the DISROOT_SSH_KEY org/repo secret to enable."
171
192
172
193
mirror-gitea:
173
194
timeout-minutes: 20
174
195
runs-on: ${{ inputs.runs-on }}
175
196
if: vars.GITEA_MIRROR_ENABLED == 'true'
197
+
# See mirror-gitlab: the `secrets` context is not valid in step `if:`;
198
+
# hoist to job-level `env` and gate steps on `env.GITEA_KEY`.
echo "::notice::GITEA_MIRROR_ENABLED=true but secrets.GITEA_SSH_KEY is empty. Skipping Gitea mirror. Configure the GITEA_SSH_KEY org/repo secret to enable."
0 commit comments