8000 Call workflows on the other repository with GITHUB_TOKEN · Issue #351 · actions/github-script · GitHub
[go: up one dir, main page]

Skip to content
Call workflows on the other repository with GITHUB_TOKEN #351
Closed
@shmpwk

Description

@shmpwk

Is your feature request related to a problem? Please describe.

As I understand, workflow_dispatch and repository_dispatch with GITHUB_TOKEN can call the other workflow.
However it seems we cannot call the workflow on an other repository.

The example is introduced at GitHub Actions: Use the GITHUB_TOKEN with workflow_dispatch and repository_dispatch

name: Create Workflow Dispatch

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Trigger Workflow
        uses: actions/github-script@v6
        with:
          script: |
            github.rest.actions.createWorkflowDispatch({
              owner: context.repo.owner,
              repo: context.repo.repo,
              workflow_id: 'test.yml',
              ref: 'main',
            })

Describe the solution you'd like
call the workflow on an other repository.

Describe alternatives you've considered
Currently I end up using personal access token or Github Apps instead of GITHUB_TOKEN

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0