{"id":20490710,"url":"https://github.com/circleci-public/trigger-circleci-pipeline-action","last_synced_at":"2025-10-30T07:03:08.907Z","repository":{"id":37085926,"uuid":"433600690","full_name":"CircleCI-Public/trigger-circleci-pipeline-action","owner":"CircleCI-Public","description":"Trigger a CircleCI pipeline from any GitHub Actions event.","archived":false,"fork":false,"pushed_at":"2025-03-25T21:50:59.000Z","size":160,"stargazers_count":49,"open_issues_count":21,"forks_count":42,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-06T17:50:32.137Z","etag":null,"topics":["actions","ci-cd","continuous-delivery","github-action","github-actions"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/trigger-circleci-pipeline","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CircleCI-Public.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-30T22:05:46.000Z","updated_at":"2025-04-30T14:22:32.000Z","dependencies_parsed_at":"2024-10-25T03:13:57.659Z","dependency_job_id":"b5607c5a-2a77-42c8-8dba-f9d1a59d2c93","html_url":"https://github.com/CircleCI-Public/trigger-circleci-pipeline-action","commit_stats":{"total_commits":24,"total_committers":13,"mean_commits":"1.8461538461538463","dds":0.75,"last_synced_commit":"7232fb1e8e9b879bffee432143c0e6b4838cc102"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Ftrigger-circleci-pipeline-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Ftrigger-circleci-pipeline-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Ftrigger-circleci-pipeline-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CircleCI-Public%2Ftrigger-circleci-pipeline-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CircleCI-Public","download_url":"https://codeload.github.com/CircleCI-Public/trigger-circleci-pipeline-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253757605,"owners_count":21959441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","ci-cd","continuous-delivery","github-action","github-actions"],"created_at":"2024-11-15T17:18:10.461Z","updated_at":"2025-10-30T07:03:08.858Z","avatar_url":"https://github.com/CircleCI-Public.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!NOTE]  \n\u003e\n\u003e **CircleCI now supports [more events to trigger workflows](https://circleci.com/docs/github-trigger-event-options/).**  Not seeing the event that you want, let us know [here](https://forms.gle/j7DC78CQNRmSBn159). \n\u003e\n\u003e This GitHub Action does not yet support CircleCI projects that are integrated with the [CircleCI GitHub App](https://circleci.com/docs/github-apps-integration/).  If your CircleCI project URL looks like this: `https://app.circleci.com/projects/organizations/circleci%`, you are integrating with the CircleCI GitHub App and this GitHub Action is not yet supported.  Contact sebastian@circleci.com with any questions/feedback.  If your CircleCI project URL looks like this: `https://app.circleci.com/projects/project-dashboard/github/`, you are using [CircleCI's OAuth App integration](https://circleci.com/docs/github-integration/) and this GitHub Action is supported.\n\n# Trigger CircleCI Pipeline\n\nTrigger your [CircleCI](https://circleci.com/) pipelines from any [event](https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows) on GitHub with [GitHub Actions](https://github.com/features/actions).\n\n# How to Use\n\n1. Create a GitHub Action's workflow for the desired CircleCI pipeline.\n\n   Do this by adding a workflow YAML file (we'll use `main.yml`) to `./.github/workflows`.\n\n   A `release` trigger is shown in this example. Try any of the GitHub events for triggering workflows:\n   https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows\n\n   Select a custom name and id for the step for additional contextual metadata in your CircleCI pipeline\n\n```yaml\non:\n  release:\n    types: [published]\njobs:\n  trigger-circleci:\n    runs-on: ubuntu-latest\n    steps:\n      - name: \u003ccustomize name\u003e\n        id: \u003ccustomize id\u003e\n        uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5\n        env:\n          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}\n```\n\n2. Create an [encrypted secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) named `CCI_TOKEN` containing the [Personal API Token](https://circleci.com/docs/2.0/managing-api-tokens/) that will be used to trigger the pipelines. This is suggested to be a [machine user](https://docs.github.com/en/developers/overview/managing-deploy-keys#machine-users).\n\n3. Add the [Pipeline Parameter](https://circleci.com/docs/2.0/pipeline-variables/) definitions to your CircleCI config. This data will be entered by the GitHub Action when triggered.\n\n   Add the following to the top of your `.circleci/config.yml` file. Ensure you are specifying version `2.1`\n\n   ```yaml\n   version: 2.1\n   parameters:\n     GHA_Actor:\n       type: string\n       default: \"\"\n     GHA_Action:\n       type: string\n       default: \"\"\n     GHA_Event:\n       type: string\n       default: \"\"\n     GHA_Meta:\n       type: string\n       default: \"\"\n   ```\n\n4. Use the Pipeline Parameter data to run [workflows conditionally](https://circleci.com/docs/2.0/pipeline-variables/#conditional-workflows).\n\n   **_See: [Examples](https://github.com/CircleCI-Public/trigger-circleci-pipeline-action/tree/main/examples)_**\n\n# Inputs\n\nOptional [input parameters](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputs) that allow you to specify additional metadata.\n\n### GHA_Meta\n\n**required:** false\n\n**description**: An optional additional metadata parameter. Will be available on the CircleCI pipeline as GHA_Meta.\n\n```yaml\njobs:\n  trigger-circleci:\n    runs-on: ubuntu-latest\n    steps:\n      - name: \u003ccustomize name\u003e\n        id: \u003ccustomize id\u003e\n        uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5\n        with:\n          GHA_Meta: \"\u003ccustom data\u003e\"\n        env:\n          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}\n```\n\n### target-slug\n\n**required:** false\n\n**description**: The [CircleCI project slug](https://circleci.com/docs/api-developers-guide/#github-and-bitbucket-projects) of the target project (ex: `github/\u003corg\u003e/\u003crepo\u003e`). If not specified, the slug of the current GitHub repository will be used.\n\n```yaml\njobs:\n  trigger-circleci:\n    runs-on: ubuntu-latest\n    steps:\n      - name: \u003ccustomize name\u003e\n        id: \u003ccustomize id\u003e\n        uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5\n        with:\n          target-slug: \"gh/\u003corg\u003e/\u003crepo\u003e\" # Will trigger the pipeline for external project\n        env:\n          CCI_TOKEN: ${{ secrets.CCI_TOKEN }}\n```\n\n# Outputs\n\nField | Data Type | Description\n-- | -- | --\n`id` | string (uuid) | The unique ID of the pipeline.\n`state` | string (Enum: \"created\" \"errored\" \"setup-pending\" \"setup\" \"pending\") | The current state of the pipeline.\n`number` | integer (int64) | The number of the pipeline.\n`created_at` | string (date-time) | The date and time the pipeline was created.\n\n# Things To Know\n\n## GitHub Actions runs _alongside_ native CircleCI integration.\n\nBy default, when a repository is connected to CircleCI, if the workflows within that project's configuration does not specify any conditionals or filters that would otherwise prevent execution, the workflow will execute on every `push` event by default.\n\nThis may mean it is possible to accidentally run a job twice, once on the `push` event from CircleCI, as well as other events triggered by the GitHub Action.\n\n### To prevent double execution\n\nIf you are relying on GitHub Actions to provide all of your API triggers, ensure that each of your CircleCI configuration's workflows contains a [conditional](https://circleci.com/docs/2.0/pipeline-variables/#conditional-workflows) limiting it's execution to only the GitHub Action trigger.\n\n**Example**\n\n```yaml\nworkflows:\n  # This workflow is set to be conditionally triggered,\n  # only via the GitHub Action.\n  # With no other unfiltered workflows, normal push events will be ignored.\n  test:\n    when: \u003c\u003c pipeline.parameters.GHA_Action \u003e\u003e\n    jobs:\n      - test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircleci-public%2Ftrigger-circleci-pipeline-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcircleci-public%2Ftrigger-circleci-pipeline-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircleci-public%2Ftrigger-circleci-pipeline-action/lists"}