SHA256
Update deploy.yml
This commit is contained in:
1 parent
eb5138e635
commit
1e45ef8379
1 file changed
+8
-3
@@ -35,14 +35,17 @@ jobs:
|
|||||||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.chillcog.com -u "${{ git.repository_owner }}" --password-stdin
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.chillcog.com -u "${{ git.repository_owner }}" --password-stdin
|
||||||
|
|
||||||
- name: Detect and Build Images
|
- name: Detect and Build Images
|
||||||
|
env:
|
||||||
|
REPO_OWNER: ${{ git.repository_owner }}
|
||||||
|
EVENT_NAME: ${{ github.event_name }}
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache bash findutils
|
apk add --no-cache bash findutils
|
||||||
|
|
||||||
FILES_TO_BUILD=""
|
FILES_TO_BUILD=""
|
||||||
REGISTRY_HOST="git.chillcog.com"
|
REGISTRY_HOST="git.chillcog.com"
|
||||||
OWNER_LOWER=$(echo "${{ git.repository_owner }}" | tr '[:upper:]' '[:lower:]')
|
OWNER_LOWER=$(echo "$REPO_OWNER" | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
if [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
if [ "$EVENT_NAME" = "schedule" ] || [ "$EVENT_NAME" = "workflow_dispatch" ]; then
|
||||||
echo "Scheduled or manual run triggered. Processing all YAML files..."
|
echo "Scheduled or manual run triggered. Processing all YAML files..."
|
||||||
FILES_TO_BUILD=$(find . -maxdepth 1 -name "*.yml" -o -name "*.yaml")
|
FILES_TO_BUILD=$(find . -maxdepth 1 -name "*.yml" -o -name "*.yaml")
|
||||||
else
|
else
|
||||||
@@ -55,7 +58,9 @@ jobs:
|
|||||||
if [ ! -f "$file" ]; then continue; fi
|
if [ ! -f "$file" ]; then continue; fi
|
||||||
if [[ "$file" == .gitea/* ]]; then continue; fi
|
if [[ "$file" == .gitea/* ]]; then continue; fi
|
||||||
filename=$(basename -- "$file")
|
filename=$(basename -- "$file")
|
||||||
image_name=$(echo "${filename%.*}" | tr '[:upper:]' '[:lower:]')
|
|
||||||
|
image_base="${filename%.*}"
|
||||||
|
image_name=$(echo "$image_base" | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
echo "---------------------------------------------------"
|
echo "---------------------------------------------------"
|
||||||
echo "Processing: $file -> Target: ${REGISTRY_HOST}/${OWNER_LOWER}/${image_name}:latest"
|
echo "Processing: $file -> Target: ${REGISTRY_HOST}/${OWNER_LOWER}/${image_name}:latest"
|
||||||
|
|||||||
Reference in new issue
Block a user