A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/actions/create-github-app-token/issues/121 below:

Token seems to expire after 1h · Issue #121 · actions/create-github-app-token · GitHub

I'm running a workflow (target-workflow.yml) in another repository (target-repo) of my organization using https://github.com/aurelien-baudet/workflow-dispatch (v2).
To that end I'm generating an app token with actions/create-github-app-token@v1.
I can generate the token with no issues, and aurelien-baudet/workflow-dispatch@v2 manages to trigger target-workflow.yml all right as well.
However, after some time, fetching the status of target-workflow starts to fail with Warning: Failed to get workflow status: Bad credentials. This causes my parent job to fail.
That seems to start happening after exactly 1h.

Am I correct that the token expires after 1h? Is it documented somewhere?
Also, is there a way to extend the lifetime of this token? Otherwise, do you suggest a workaround?

My workflow:

name: Run target-workflow.yml in other target-repo

permissions:
  id-token: write
  contents: read

jobs:
  run-target-workflow:
    name: Run target-workflow
    runs-on: ubuntu-latest
    steps:
      - uses: actions/create-github-app-token@v1
        id: app-token
        with:
          app-id: ...  # My app id
          private-key: ...  # My private key
          repositories: "target-repo"

      - name: Run workflow in target-repo
        uses: aurelien-baudet/workflow-dispatch@v2
        with:
          ref: main
          repo: target-repo
          workflow: target-workflow.yml
          wait-for-completion: true
          wait-for-completion-timeout: 2h
          token: ${{ steps.app-token.outputs.token }}
          inputs: ...  # The relevant inputs to target-workflow

The output of aurelien-baudet/workflow-dispatch@v2 step:

Run aurelien-baudet/workflow-dispatch@v2
Workflow triggered 🚀
You can follow the running workflow here: https://github.com/...
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Waiting for workflow completion
Warning: Failed to get workflow status: Bad credentials
Warning: Failed to get workflow status: Bad credentials
Warning: Failed to get workflow status: Bad credentials
... 

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4