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?