action-gh-release icon indicating copy to clipboard operation
action-gh-release copied to clipboard

Bad credentials (ubuntu-latest)

Open skirpichev opened this issue 4 years ago • 3 comments

See example. This github action doesn't work at all...

Seems to be like (closed) https://github.com/softprops/action-gh-release/issues/12.

BTW, full yml snippet, that uses your software in my case:

    - name: Publish on Github Releases
      uses: softprops/action-gh-release@v1
      if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        files: dist/*
        draft: true
        prerelease: true
        name: "Diofant ${VERSION}"
        body: "See [release notes](https://diofant.readthedocs.io/\
               en/latest/release/notes-${SHORT_VERSION}.html)."

skirpichev avatar Oct 12 '19 08:10 skirpichev

@skirpichev sorry to hear that.

The last time we've seen this reported it was on a project where the api interaction happen long enough after GitHub actions provisioned a token that it expired but the time it was used.

This issue was raised to GitHub's support team and it was reported fixed here https://github.com/softprops/action-gh-release/issues/12#issuecomment-532155535. I closed the issue on this repo because the issue didn't seem rooted in this plugin but in the way GitHub actions manages these tokens itself

I took a look an your linked workflow run and it seems to have taken ~2.5 hours. This may also be getting closed to breaching that window of expiration.

/cc @ethomson

I dont have control over when these tokens expire so you may want to reach out to the community forum https://github.community/t5/GitHub-Actions/bd-p/actions. This issue isn't specific to to this action but applies to any action that interacts with the GitHub api.

Alternative workarounds could be as follows

  1. create a new secret for a personal access token you create (these dont expire) and assign that to the GITHUB_TOKEN env var for this action.

  2. try to parallelize portions of you job into multiple jobs so that the release is able to happen sooner.

softprops avatar Oct 12 '19 15:10 softprops

I'll test the 1st option.

skirpichev avatar Oct 12 '19 15:10 skirpichev

Hmm, this option does work. But a bit fragile: if for some reasons the whole job was restarted - I got error from #20.

skirpichev avatar Oct 13 '19 13:10 skirpichev