Skip to content

Commit 1901c30

Browse files
ejsmithclaude
andcommitted
CI-feed package publishing is best-effort
Push-triggered builds failed at Publish CI Packages when GitHub Packages returned 403 for Foundatio.Redis/Foundatio.Aws — those package names are linked to their original standalone repos, so this repo's GITHUB_TOKEN cannot push new versions of them. A CI-feed rejecting one package must not fail a build whose compile and tests passed: each failed push now surfaces as a warning annotation and the loop continues. Release publishing to NuGet on tags stays strict. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9ec7adc commit 1901c30

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/build-workflow.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,23 @@ jobs:
122122
- name: Publish CI Packages
123123
if: github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'
124124
run: |
125+
# CI-feed publishing is best-effort: a feed rejecting one package (e.g. GitHub Packages returns 403 when the
126+
# package name is linked to a different repo) must not fail a build whose compile and tests passed. Each
127+
# failure surfaces as a warning annotation instead. Release publishing to NuGet (below) stays strict.
125128
for package in $(find . -name "*.nupkg" | grep -v "minver" | grep -v "/EmptyFiles/"); do
126129
127130
# GitHub
128131
if [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then
129132
echo "${0##*/}": Pushing $package to GitHub...
130-
dotnet nuget push $package --source https://nuget.pkg.github.com/${{ inputs.org }}/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
133+
dotnet nuget push $package --source https://nuget.pkg.github.com/${{ inputs.org }}/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate \
134+
|| echo "::warning::Failed to push ${package##*/} to GitHub Packages; continuing"
131135
fi
132136
133137
# Feedz (remove once GitHub supports anonymous access)
134138
if [ -n "${{ secrets.FEEDZ_KEY }}" ]; then
135139
echo "${0##*/}": Pushing $package to Feedz...
136-
dotnet nuget push $package --source https://f.feedz.io/foundatio/foundatio/nuget --api-key ${{ secrets.FEEDZ_KEY }} --skip-duplicate
140+
dotnet nuget push $package --source https://f.feedz.io/foundatio/foundatio/nuget --api-key ${{ secrets.FEEDZ_KEY }} --skip-duplicate \
141+
|| echo "::warning::Failed to push ${package##*/} to Feedz; continuing"
137142
fi
138143
139144
done

0 commit comments

Comments
 (0)