fixes
Some checks failed
Some checks failed
This commit is contained in:
@@ -18,7 +18,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|
||||||
- name: Check for changes before building
|
- name: Check for changes before building
|
||||||
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
|
||||||
@@ -28,7 +27,7 @@ jobs:
|
|||||||
image_tag=latest
|
image_tag=latest
|
||||||
comparison_hash="${{ gitea.event.before }}"
|
comparison_hash="${{ gitea.event.before }}"
|
||||||
|
|
||||||
if [[ "$branch_name" != "${{ gitea.event.repository.default_branch }}" ]]; then
|
if [[ "$branch_name" != "$default_branch_name" ]]; then
|
||||||
image_tag=$branch_name
|
image_tag=$branch_name
|
||||||
fi
|
fi
|
||||||
# slugify
|
# slugify
|
||||||
@@ -49,7 +48,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "default_branch_name=$default_branch_name"
|
echo "default_branch_name=$default_branch_name" >> $GITEA_OUTPUT
|
||||||
echo "branch_name=$branch_name" >> $GITEA_OUTPUT
|
echo "branch_name=$branch_name" >> $GITEA_OUTPUT
|
||||||
echo "image_tag=$image_tag" >> $GITEA_OUTPUT
|
echo "image_tag=$image_tag" >> $GITEA_OUTPUT
|
||||||
echo "comparison_hash=$comparison_hash" >> $GITEA_OUTPUT
|
echo "comparison_hash=$comparison_hash" >> $GITEA_OUTPUT
|
||||||
@@ -58,6 +57,8 @@ jobs:
|
|||||||
- name: Set up Docker buildx
|
- name: Set up Docker buildx
|
||||||
if: steps.image-changes.outputs.build_image == 'true'
|
if: steps.image-changes.outputs.build_image == 'true'
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: network=runners-net
|
||||||
|
|
||||||
- name: Log in to Github Container Registry
|
- name: Log in to Github Container Registry
|
||||||
if: steps.image-changes.outputs.build_image == 'true'
|
if: steps.image-changes.outputs.build_image == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user