Skip to content
Merged
Show file tree
Hide file tree
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
22 changes: 19 additions & 3 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,29 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
GH_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
# ACTIONS_TOKEN (PAT) preferred - PRs created with github.token won't trigger CI workflows
GH_TOKEN: ${{ secrets.ACTIONS_TOKEN || github.token }}
steps:
- name: Check token configuration
run: |
if [ -z "${{ secrets.ACTIONS_TOKEN }}" ]; then
echo "::warning::ACTIONS_TOKEN not set - using github.token as fallback"
echo ""
echo "⚠️ PRs created with github.token have limitations:"
echo " - Won't trigger on:pull_request workflows (CI won't run automatically)"
echo " - May be blocked by branch protection rules"
echo ""
echo "To enable full functionality, set ACTIONS_TOKEN secret:"
echo " gh secret set ACTIONS_TOKEN"
else
echo "✅ Using ACTIONS_TOKEN for full PR functionality"
fi

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
token: ${{ secrets.ACTIONS_TOKEN }}
# ACTIONS_TOKEN preferred for pushing to protected branches
token: ${{ secrets.ACTIONS_TOKEN || github.token }}
fetch-depth: 0

- name: Determine source branch
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
with:
ref: main
fetch-depth: 0
token: ${{ secrets.ACTIONS_TOKEN }}

- name: Setup Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -70,6 +69,20 @@ jobs:

echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "New version: $NEW_VERSION"
echo "Branch name: $BRANCH_NAME"

- name: Check if branch already exists
run: |
BRANCH_NAME="${{ steps.new-version.outputs.branch_name }}"

# Check if branch exists locally or remotely
if git show-ref --verify --quiet refs/heads/$BRANCH_NAME || git show-ref --verify --quiet refs/remotes/origin/$BRANCH_NAME; then
echo "❌ Branch $BRANCH_NAME already exists"
exit 1
else
echo "✅ Branch $BRANCH_NAME does not exist, proceeding..."
fi

- name: Configure Git
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ on:
description: 'The GitHub release URL'
value: ${{ jobs.tag.outputs.release_url }}
secrets:
ACTIONS_TOKEN:
required: true
ANTHROPIC_API_KEY:
required: true

Expand All @@ -38,7 +36,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch_ref }}
token: ${{ secrets.ACTIONS_TOKEN }}
token: ${{ github.token }}
fetch-depth: 0

- name: Get Version from pyproject.toml
Expand Down Expand Up @@ -258,7 +256,7 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}

- name: Create release summary
if: steps.check-tag.outputs.tag_exists == 'false'
Expand Down