I have a CI that runs when a tag is created, but I would like to be able to run it manually as well. Unfortunately, the CI uses the tag name to set the name of the artifact.
I tried this:
stages:
- build
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_JOB_MANUAL
variables:
- CI_COMMIT_TAG: "manual"
build_app:
script:
- echo "Build completed"
artifacts:
expire_in: 30 days
paths:
- .
name: "app-$CI_COMMIT_TAG"
What I would like is:
- With
git tag v2.4.1 && git push --tags
, it should create the artifactapp-v2.4.1.zip
. - With "Pipeline --> Run pipeline", it should create the artifcat
app-manual.zip
.
Unfortunately, I can't run it manually (Pipelines --> Run Pipeline) because "Pipeline filtered out by workflow rules."
How to fix my CI?