Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/update-artifacts-file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ jobs:
if (fs.existsSync(path)) {
data = JSON.parse(fs.readFileSync(path, 'utf8'));
}
// Ensure nested structure: docker -> registry -> artifact:tag
if (!data['${{ inputs.type }}']) data['${{ inputs.type }}'] = {};
// Ensure nested structure: docker -> registry -> scope -> artifact:tag
if (!data['${{ inputs.type }}']['${{ secrets.ACR_URL }}']) data['${{ inputs.type }}']['${{ secrets.ACR_URL }}'] = {};
data['${{ inputs.type }}']['${{ secrets.ACR_URL }}']['${{ inputs.artifact-name }}'] = '${{ inputs.artifact-tag }}';
const compositeKey = '${element}/${{ inputs.artifact-name }}';
// Assign the artifact tag to the composite key
data['${{ inputs.type }}']['${{ secrets.ACR_URL }}'][compositeKey] = '${{ inputs.artifact-tag }}';
// Writing new file contents
fs.writeFileSync(path, JSON.stringify(data, null, 2));
"
Expand Down