fatal: protocol error: bad line length character: erro #283
-
I am trying to use this action to add a coverage badge in this PR:https://github.com/indeedeng/iwf/pull/184/files However it got error when running:
Can you point out what I am missing? I have been trying different things for a while but didn't have any clues... Thanks all in advance!!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Just for easier debugging, I think you're talking about these 4 specific runs that all failed with the same error message:
Below the error message I can see the response from GitHub:
It seems the name: Temporal Integration Test
on:
pull_request:
push:
branches:
- 'main'
jobs:
tests:
name: "Integration testing"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up temporal environment"
run: docker compose -f docker-compose/ci-temporal-dependencies.yml up -d
- name: "Test against temporal"
run: make ci-temporal-integ-test
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
- name: Go Coverage Badge
uses: tj-actions/coverage-badge-go@v1
with:
filename: coverage.out
+ - name: Pull in remote changes
+ run: git pull --rebase
- uses: stefanzweifel/git-auto-commit-action@v4
id: auto-commit-action
with:
commit_message: Apply Code Coverage Badge
skip_fetch: true
skip_checkout: true
file_pattern: ./README.md
- name: Push Changes
if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.ref }} Looking at the workflow file, I think the "Push Changes" step using A workflow like below should do the trick. name: Temporal Integration Test
on:
pull_request:
push:
branches:
- 'main'
jobs:
tests:
name: "Integration testing"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set up temporal environment"
run: docker compose -f docker-compose/ci-temporal-dependencies.yml up -d
- name: "Test against temporal"
run: make ci-temporal-integ-test
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@v2
- name: Go Coverage Badge
uses: tj-actions/coverage-badge-go@v1
with:
filename: coverage.out
- name: Pull in remote changes
run: git pull --rebase
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply Code Coverage Badge
skip_fetch: true
skip_checkout: true
file_pattern: ./README.md |
Beta Was this translation helpful? Give feedback.
@rockdaboot Looking at the workflow you're currently working with, I think the issue could be related on how
actions/checkout
is set up.The workflow checks out the repository in a detached state:
https://github.com/elastic/go-freelru/actions/runs/7412916522/job/20170728985#step:3:77
As no
branch
-option is passed to git-auto-commit, the action will push the changes to the default branch it has.Could you add
ref: ${{ github.head_ref }}
to the actions/checkout step, to explicitly tell Actions, to check out the right branch.- uses: actions/checkout@v4 with: + ref: ${{ github.head_ref }}