default: image: alpine:latest tags: [ docker ] stages: - commit - pages add-commit: rules: - if: $CI_PIPELINE_SOURCE == "trigger" - if: $CI_PIPELINE_SOURCE == "web" stage: commit before_script: - apk add curl script: - COLON=':' - echo "test" >> test.tsv - echo '{"branch"${COLON} "main", "commit_message"${COLON} "new commit via ci pipeline", "actions"${COLON} [ { "action"${COLON} "update", "file_path"${COLON} "test.tsv", "encoding"${COLON} "base64", "content"${COLON} "' > commit.json - base64 test.tsv >> commit.json - echo '" } ] }' >> commit.json - curl --fail-with-body --request POST --header "PRIVATE-TOKEN${COLON} $CIPRIVATETOKEN" --header "Content-Type${COLON} application/json" --data "$(cat commit.json)" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/commits" pages: rules: - if: $CI_PIPELINE_SOURCE == "commit" stage: pages script: - echo "TODO"