gitlab-ci 测试构建失败

gitlab-ci testing build failed

我是 gitlab-ci 的新手,我正在尝试测试我的构建阶段,但它在最后一步之前一直失败。这是部分

build:
  stage: build
  before_script:
    - git config user.name "$GITLAB_USER_NAME"
    - git config user.email "$GITLAB_USER_EMAIL"
  script:
    - git add .
    - git commit -m "[skip ci] migrations"
    - git push "https://${GITLAB_USER_NAME}:${CI_GIT_TOKEN}@${CI_REPOSITORY_URL}" "HEAD:qa" -o ci.skip
  dependencies:
    - migrations
  only:
    - qa

这是日志,最后几行

Using docker image sha256:5b3b4504ff1f7b859dbc5d7fb86f4afc644be62f99b8ced636fbca64c8a6c2de for python:latest with digest python@sha256:73cc381fa0fe5e6d5dd38f1397da28c70096519d8818c2249f2bc8e1158ba015 ...
$ git config user.name "$GITLAB_USER_NAME"
$ git config user.email "$GITLAB_USER_EMAIL"
$ git add .
$ git commit -m "[skip ci] migrations"
HEAD detached at bf2a8e4
nothing to commit, working tree clean
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1

我怎样才能知道 ERROR: Job failed: exit code 1 是什么?我正在使用共享跑步者

错误 ERROR: Job failed: exit code 1 来自 git 没有找到任何要提交的内容。换句话说,以下消息导致了错误:

nothing to commit, working tree clean
Cleaning up file based variables

您可以确定要提交一些内容,或者您​​可以按照相关主题中的概述调整您的脚本:How to git commit nothing without an error?