CircleCI-Public / trigger-circleci-pipeline-action

Trigger a CircleCI pipeline from any GitHub Actions event.
https://github.com/marketplace/actions/trigger-circleci-pipeline
47 stars 43 forks source link

Bug: Triggering pipeline returns 404; but green on CCI #62

Open RicardoMonteiroSimoes opened 1 year ago

RicardoMonteiroSimoes commented 1 year ago

Is there an existing issue for this?

Current behavior

Right now I am changing our CCI setup to trigger through a GH Action. This is to allow us to disable these system tests via a specific label. Now, this appears to be working for anything that runs directly on GH.

Using the action from this repo (Also upgraded manually to 1.1, please refactor the example!), I have changed our config.yml file to check if GH_Action matches. This appears to work; as now the tests don't run, and my new job that checks if it doesn't match runs succesfully:

image

Now my problem is that, the only reason these fail, is because the action itself returns a 404...

image

The action setup is as simple as it gets:

name: Run CircleCi tests
on:
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  trigger-circleci:
    runs-on: ubuntu-latest
    steps:
      - name: run system tests
        id: cci_system_tests
        uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.1.0
        env:
          CCI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}

So I am not entirely sure how this is supposed to work.

Minimum reproduction code

Please see above

Steps to reproduce

No response

Expected behavior

It should correctly trigger the test with the right parameters, so that it can run the tests, and report back in the PR action if they are passing or not.

GitHub Action Version

1.1.0

Other

No response

RicardoMonteiroSimoes commented 1 year ago

After further researching, the running test on CircleCI is from the old integration, so we can assume that the action itself does not trigger anything at all. But Once I visit the URL from the action, I get no error, just the commit history.

RicardoMonteiroSimoes commented 1 year ago

I retried it using CURL (or well, a CURL plugin for VSC :P )

POST https://circleci.com/api/v2/project/gh/team/repo/pipeline
Circle-Token: personal_token
content-type: application/json

{
    "branch":"feature/branch",
    "parameters":
    {
        "GHA_Actor":"RicardoMonteiroSimoes",
        "GHA_Action":"cci_system_tests",
        "GHA_Event":"pull_request"
    }
}

And this returns a 201, and starts the tests. So there must be something broken with this action!

aimuz commented 8 months ago

having the same problem.

sergionettl commented 8 months ago

Getting the exact same error.