diff --git a/.github/workflows/release-promotion.yml b/.github/workflows/release-promotion.yml index e31f875..eae4114 100644 --- a/.github/workflows/release-promotion.yml +++ b/.github/workflows/release-promotion.yml @@ -146,6 +146,16 @@ jobs: git checkout -b "$RELEASE_BRANCH" echo "branch=$RELEASE_BRANCH" >> $GITHUB_OUTPUT + - name: Push release branch (docs-only) + if: ${{ github.event.inputs.docs_only == 'true' }} + env: + RELEASE_BRANCH: ${{ steps.release_branch.outputs.branch }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git push origin "$RELEASE_BRANCH" + echo "✅ Pushed release branch for docs-only promotion" + - name: Update CHANGELOG version id: changelog if: ${{ github.event.inputs.docs_only != 'true' }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2edc495..c75bf49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -187,11 +187,12 @@ jobs: update-results: name: Update Test Results needs: [coverage, mutation] - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/test' }} + if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: + ref: ${{ github.head_ref }} fetch-depth: 0 - uses: actions/setup-go@v6 with: @@ -239,22 +240,13 @@ jobs: echo "changed=true" >> $GITHUB_OUTPUT fi - - name: Create PR with updated results + - name: Commit test results to PR branch if: steps.changes.outputs.changed == 'true' env: GH_TOKEN: ${{ github.token }} run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - BRANCH="chore/test-results-$(date +%Y%m%d-%H%M%S)" - git checkout -b "$BRANCH" git add docs/test-results.json git commit -m "chore: update test results" - git push origin "$BRANCH" - - gh pr create \ - --base test \ - --head "$BRANCH" \ - --title "chore: update test results" \ - --body "Automated test results update from CI." + git push origin HEAD:${{ github.head_ref }} diff --git a/docs/test-results.json b/docs/test-results.json index a5ffd89..9cb98f9 100644 --- a/docs/test-results.json +++ b/docs/test-results.json @@ -11,7 +11,7 @@ "github.com/Its-donkey/yougopher/docs/examples/chatbot": 0.0, "github.com/Its-donkey/yougopher/docs/examples/analytics": 0.0 }, - "lastUpdated": "2026-01-30 08:43 UTC" + "lastUpdated": "2026-01-30 08:52 UTC" }, "mutation": { "summary": {