diff --git a/.github/workflows/versioning.yaml b/.github/workflows/versioning.yaml index d84e7ae3c..839251860 100644 --- a/.github/workflows/versioning.yaml +++ b/.github/workflows/versioning.yaml @@ -79,7 +79,11 @@ jobs: password: ${{ secrets.PYPI }} skip_existing: true - name: Update API - if: ${{ secrets.POLICYENGINE_GITHUB != '' }} - run: python .github/update_api.py + run: | + if [ -n "$CROSS_REPO_TOKEN" ]; then + GITHUB_TOKEN="$CROSS_REPO_TOKEN" python .github/update_api.py + else + echo "Skipping cross-repo API update (POLICYENGINE_GITHUB secret not set)" + fi env: - GITHUB_TOKEN: ${{ secrets.POLICYENGINE_GITHUB }} + CROSS_REPO_TOKEN: ${{ secrets.POLICYENGINE_GITHUB }} diff --git a/changelog.d/fix-versioning-secrets-syntax.fixed.md b/changelog.d/fix-versioning-secrets-syntax.fixed.md new file mode 100644 index 000000000..f02a9f992 --- /dev/null +++ b/changelog.d/fix-versioning-secrets-syntax.fixed.md @@ -0,0 +1 @@ +Fixed invalid `secrets` reference in versioning workflow step condition that prevented the workflow from running. \ No newline at end of file