Compare commits
1 Commits
873af26d8b
...
5b10145276
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b10145276 |
@@ -16,13 +16,13 @@ jobs:
|
|||||||
id: image-changes
|
id: image-changes
|
||||||
# build image only if 1. changes are detected or 2. an image for the working branch doesnt exist
|
# build image only if 1. changes are detected or 2. an image for the working branch doesnt exist
|
||||||
run: |
|
run: |
|
||||||
git --no-pager log --oneline
|
|
||||||
echo "BEFORE = ${{ gitea.event.before }}"
|
echo "BEFORE = ${{ gitea.event.before }}"
|
||||||
branch_name="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
branch_name="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||||
default_branch_name="${{ gitea.event.repository.default_branch }}"
|
default_branch_name="${{ gitea.event.repository.default_branch }}"
|
||||||
image_tag=latest
|
image_tag=latest
|
||||||
comparison_hash="${{ gitea.event.before }}"
|
comparison_hash="${{ gitea.event.before }}"
|
||||||
|
|
||||||
|
git --no-pager reflog -n $(git rev-list --count HEAD ^origin/$default_branch_name)
|
||||||
if [[ "$branch_name" != "${{ gitea.event.repository.default_branch }}" ]]; then
|
if [[ "$branch_name" != "${{ gitea.event.repository.default_branch }}" ]]; then
|
||||||
image_tag=$branch_name
|
image_tag=$branch_name
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user