Job only: [triggers] not work if triggered by $CI_JOB_TOKEN

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

Execute jobs triggered with a $CI_JOB_TOKEN or pipeline trigger.

Further details

Actually, jobs with only: [triggers] are only executed when the token is a pipeline triggger.

deploy-artifact-to-repo:
  stage: deploy
  dependencies: []
  only:
    - triggers

curl -X POST -F token=MY_PIPELINE_TRIGGER -F ref=XXX https://XXX/api/v4/projects/$CI_PROJECT_ID/trigger/pipeline

Proposal

Execute this jobs if the token is $CI_JOB_TOKEN or a pipeline trigger

curl -X POST -F token=$CI_JOB_TOKEN -F ref=XXX https://XXX/api/v4/projects/$CI_PROJECT_ID/trigger/pipeline

Edited Aug 04, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading