Trigger-circleci-pipeline-action not working

I’m trying to trigger the pipeline via github action, However in my configuration he doesn’t work properly.

In the beginning my configuration looked like this

name: Pull Request

on:
  pull_request:
    branches:
    - master
    - release-*

jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    steps:
      - name: CircleCI Trigger on Pull Request
        id: staging-and-pull-request
        uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5
        with:
          GHA_Meta: "staging-and-pull-request"
        env:
          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}

was not triggered successfully and resulted in a 404 error.
Then I checked and the slug has changed in the new version.Then I changed it to the following

name: Pull Request

on:
  pull_request:
    branches:
    - master
    - release-*

jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    steps:
      - name: CircleCI Trigger on Pull Request
        id: staging-and-pull-request
        uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5
        with:
          GHA_Meta: "staging-and-pull-request"
          target-slug: circleci/xxx/xx
        env:
          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}

I thought this would work but it doesn’t, when I request via curl I get the following error.

curl --location 'https://circleci.com/api/v1.1/project/circleci/xxx/xxx/pipeline' \
--header 'Circle-Token: token` \
--header 'content-type: application/json' \
--data '{
    "branch": "master",
    "parameters": {
        "GHA_Actor": "aimuz",
        "GHA_Action": "staging-and-pull-request",
        "GHA_Event": "push",
        "GHA_Meta": "staging-and-pull-request"
    }
}'
{
  "message" : "This API is not yet supported for this GitHub App or GitLab project. See https://circleci.com/docs/triggers-overview/#run-a-pipeline-using-the-api for more details."
}

Is this a new restriction or does it not work for me?

Seems like it only works via webhook so far? But I can’t find anything about triggering via webhook, I need to pass parameters, but I don’t know how the parameters should be passed. Is there any information on this?

I also tried to upgrade trigger-circleci-pipeline-action to the latest version of the

name: Pull Request

on:
  pull_request:
    branches:
    - master
    - release-*

jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    steps:
      - name: CircleCI Trigger on Pull Request
        id: staging-and-pull-request
        uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.1.0
        with:
          GHA_Meta: "staging-and-pull-request"
          target-slug: circleci/xxx/xxx
        env:
          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}

Hi @aimuz tnx for asking! This Github Action leverages the V2 API endpoint “trigger pipeline” CircleCI API

This V2 API endpoint is not compatible with the new Github App or Gitlab project types, and currently works for the old Github Oauth and Bitbucket type projects.

NB If your project slug starts with “circleci/” you have a new Github App or Gitlab project type.

The new “generic inbound webhook triggers” DO work with Github Apps, and might be an option to leverage (with or without Github Actions) to trigger a pipeline. Afaik they have a limitation in that they don’t support parameter or branch/tag settings, they only work on the default branch. More info can be found here: Trigger pipelines from anywhere: inbound webhooks now in preview - #4 by rit1010

Is there a way to create projects that use Github OAuth?I need PR to trigger the pipeline

Hi @aimuz if you want to move back to using GH OAuth you can do so, just go to circleci.com/vcs-authorize and click click “login” → “signed up before september 2023” → “login with github”.

This will create a new gh oauth org, that you need to re set up.

An alternative route could be to use the new generic inbound webhooks, but this requires some workarounds in the config. You would send the branch name as part of the payload, then parse the payload in the config, and use a custom git clone that clones from the branch in the payload.

Let me know if there is anything I can help with.