5

Trying to use pulumi preview with Github actions. The workflow file is giving me the below error.

Invalid workflow file: .github/workflows/pull_request.yml#L12

error parsing called workflow "peopleticker/ccc/.github/workflows/pull_request.yml@master": workflow was not found.

I'm using the workflow file below kindly check:

name: Call a reusable workflow

permissions:
  id-token: write
  contents: read

on:
  pull_request:

jobs:
  call-workflow-passing-data:
    uses: peopleticker/ccc/.github/workflows/pull_request.yml@master
riQQ
  • 9,878
  • 7
  • 49
  • 66
user3127647
  • 61
  • 1
  • 3
  • In which repository is this workflow? Are you sure the file `pull_request.yml` exists in the repository `ccc`? If the repository `ccc` is private, then you can't reference it. You can only reference public reusable workflows or within an org. – rethab Jun 14 '22 at 08:53
  • It is within an org. Not able to figure out where I am actually going wrong – user3127647 Jun 14 '22 at 15:04

3 Answers3

8

According to GitHub document: doc

You can visit repository Setting -> Actions -> Access: Choose "Accessible from repositories in the organization"

Evan
  • 1,152
  • 1
  • 11
  • 18
0

Actions and reusable workflows in your private repositories can be shared with other private repositories owned by the same user or organization.

Managing access for a private repository in an organization

  1. On GitHub, navigate to the main page of the private repository.

  2. Under your repository name, click Settings.

  3. In the left sidebar, click Actions, then click General.

  4. Under Access, choose one of the access settings:

    • Not accessible - Workflows in other repositories cannot access this repository.
    • Accessible from repositories in the 'ORGANIZATION NAME' organization - Workflows in other repositories that are part of the 'ORGANIZATION NAME' organization can access the actions and reusable workflows in this repository. Access is allowed only from private repositories.
  5. Click Save to apply the settings.

source


Outdated, valid at the time the question was asked:

You can't use reusable workflows from other private repositories.

Reusable workflows stored within a private repository can only be used by workflows within the same repository.

source

riQQ
  • 9,878
  • 7
  • 49
  • 66
0

You can use private repo workflows but you have to give access on org level. Github give access that. Related documentaion: github-doc Example Video Explanation: video-expl