Skip to content
Snippets Groups Projects
Verified Commit 1b8b9dbc authored by Jérôme Charaoui's avatar Jérôme Charaoui :telescope:
Browse files

ci: merge find-files into a single job

this job should work with both merge requests and regular commits
parent 7cc9ac80
No related branches found
No related tags found
No related merge requests found
......@@ -8,17 +8,15 @@
# those files. it uses a separate image because
# markdownlint/markdownlint doesn't ship with git (and runs as a
# regular user, so we can't install it either)
find-files-commit:
find-files:
stage: build
image: debian:stable-slim
script:
- apt update && apt install -yy --no-install-recommends git ca-certificates
- echo "commit SHA $CI_COMMIT_SHA"
- export LATEST_COMMIT_SHA="${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-${CI_COMMIT_SHA}}"
- echo "commit SHA $LATEST_COMMIT_SHA"
- |
echo "working on files... $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | tee changed-files.txt)"
except:
refs:
- merge_requests
echo "working on files... $(git diff-tree --no-commit-id --name-only -r $LATEST_COMMIT_SHA | tee changed-files.txt)"
only:
changes:
- "*.md"
......@@ -28,26 +26,6 @@ find-files-commit:
- changed-files.txt
expose_as: 'changed files'
# this is the same as the above, but for merge requests
find-files-mr:
stage: build
image: debian:stable-slim
script:
- apt update && apt install -yy --no-install-recommends git ca-certificates
- echo "MR target SHA $CI_MERGE_REQUEST_TARGET_BRANCH_SHA"
- |
echo "working on files: $(git diff-tree --no-commit-id --name-only -r $CI_MERGE_REQUEST_TARGET_BRANCH_SHA | tee changed-files.txt)"
only:
refs:
- merge_requests
changes:
- "*.md"
- "**/*.md"
artifacts:
paths:
- changed-files.txt
expose_as: 'changed files'
# this compares the current repo with the actual wiki to make sure
# we're not missing any commits, and will fail the push if we need to
# pull from the wiki
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment