mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-09-09 20:05:26 -04:00
Hugo workflow: use CI_COMMIT_SHA in commit message (#34)
Within the Hugo workflow, the commit message was built interpolating the `CI_BUILD_CREATED` builtin Woodpecker variable. I believe it is not defined (anymore?): https://woodpecker-ci.org/docs/usage/environment. The most similar thing I have found is `CI_PIPELINE_CREATED`, but I can't get any value beside 0 out of it when using this pipeline. So I propose we use `CI_COMMIT_SHA`, which I already tested in one of my personal projects: https://ci.codeberg.org/repos/12701/pipeline/19/1. I believe `CI_COMMIT_SHA` is the ideal unique identifier for pipeline triggered by push actions. Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/34 Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org> Co-authored-by: Stefano Volpe <stefano.volpe@student.uva.nl> Co-committed-by: Stefano Volpe <stefano.volpe@student.uva.nl>
This commit is contained in:
parent
18bcfb560c
commit
d85e697118
@ -50,7 +50,7 @@ steps:
|
|||||||
# Commit and push all static files with pipeline started timestamp
|
# Commit and push all static files with pipeline started timestamp
|
||||||
- cd $CI_REPO_NAME
|
- cd $CI_REPO_NAME
|
||||||
- git add .
|
- git add .
|
||||||
- git commit -m "Woodpecker CI ${CI_BUILD_CREATED}"
|
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA}"
|
||||||
- git push
|
- git push
|
||||||
when:
|
when:
|
||||||
event: push
|
event: push
|
||||||
|
Loading…
x
Reference in New Issue
Block a user