@@ -14,7 +14,7 @@ inputs:
1414 oci-registry :
1515 description : |
1616 OCI registry configuration used to pull, push and cache images.
17- Accepts either a registry hostname string (legacy format) or a JSON object.
17+ Accepts either a registry hostname string (default format) or a JSON object.
1818 JSON example: `{"pull":"docker.io","pull:private":"ghcr.io","push":"ghcr.io"}`
1919 JSON object keys:
2020 - `pull`: registry used to pull public or default base images
@@ -27,15 +27,15 @@ inputs:
2727 oci-registry-username :
2828 description : |
2929 Username configuration used to log against OCI registries.
30- Accepts either a single username string (legacy format) or a JSON object using the same keys as `oci-registry`.
30+ Accepts either a single username string (default format) or a JSON object using the same keys as `oci-registry`.
3131 JSON example: `{"pull:private":"${{ github.repository_owner }}","push":"${{ github.repository_owner }}"}`
3232 See https://github.com/docker/login-action#usage.
3333 default : ${{ github.repository_owner }}
3434 required : true
3535 oci-registry-password :
3636 description : |
3737 Password or personal access token configuration used to log against OCI registries.
38- Accepts either a single password/token string (legacy format) or a JSON object using the same keys as `oci-registry`.
38+ Accepts either a single password/token string (default format) or a JSON object using the same keys as `oci-registry`.
3939 JSON example: `{"pull:private":"${{ github.token }}","push":"${{ github.token }}"}`
4040 Can be passed in using `secrets.GITHUB_TOKEN`.
4141 See https://github.com/docker/login-action#usage.
@@ -199,7 +199,7 @@ runs:
199199 }
200200
201201 if (typeof parsedValue === 'string') {
202- return { legacy : normalizeString(parsedValue, inputName) };
202+ return { scalar : normalizeString(parsedValue, inputName) };
203203 }
204204
205205 return Object.entries(parsedValue).reduce((roleMap, [key, value]) => {
@@ -213,18 +213,18 @@ runs:
213213 }
214214
215215 function resolveCredentialByRole(credentialMap, role, registry, pushRegistry) {
216- const legacyCredential = credentialMap.legacy ?? '';
216+ const defaultCredential = credentialMap.scalar ?? '';
217217
218218 if (role === 'push') {
219- return credentialMap.push ?? legacyCredential ;
219+ return credentialMap.push ?? defaultCredential ;
220220 }
221221
222222 if (role === 'cache') {
223- return credentialMap.cache ?? credentialMap.push ?? legacyCredential ;
223+ return credentialMap.cache ?? credentialMap.push ?? defaultCredential ;
224224 }
225225
226226 if (!isPullRole(role)) {
227- return legacyCredential ;
227+ return defaultCredential ;
228228 }
229229
230230 if (credentialMap[role] !== undefined) {
@@ -239,7 +239,7 @@ runs:
239239 return credentialMap.push;
240240 }
241241
242- return legacyCredential ;
242+ return defaultCredential ;
243243 }
244244
245245 const registryInput = normalizeRoleMapInput('oci-registry', `${{ inputs.oci-registry }}`);
@@ -249,8 +249,8 @@ runs:
249249 let pullRegistryEntries = [];
250250 let pullRegistries = [];
251251
252- if (registryInput.legacy ) {
253- pushRegistry = registryInput.legacy ;
252+ if (registryInput.scalar ) {
253+ pushRegistry = registryInput.scalar ;
254254 cacheRegistry = pushRegistry;
255255 pullRegistries = [pushRegistry];
256256 } else {
0 commit comments