SHA256
Update deploy.yml
This commit is contained in:
1 parent
d55fd81441
commit
ca1feb05cc
1 file changed
+18
-6
@@ -10,13 +10,23 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: local
|
strategy:
|
||||||
|
matrix:
|
||||||
|
runner: [linux-amd64, linux-arm64]
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: docker:latest
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
with:
|
apk add --no-cache git
|
||||||
fetch-depth: 0
|
git config --global init.defaultObjectFormat sha256
|
||||||
|
git clone https://${{ github.token }}@git.chillcog.com/${{ github.repository }}.git .
|
||||||
|
git checkout ${{ github.sha }}
|
||||||
|
|
||||||
- name: Log in to DHI Registry
|
- name: Log in to DHI Registry
|
||||||
run: |
|
run: |
|
||||||
@@ -28,6 +38,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Detect and Build Images
|
- name: Detect and Build Images
|
||||||
run: |
|
run: |
|
||||||
|
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 "${{ git.repository_owner }}" | tr '[:upper:]' '[:lower:]')
|
||||||
@@ -37,7 +49,7 @@ jobs:
|
|||||||
FILES_TO_BUILD=$(find . -maxdepth 1 -name "*.yml" -o -name "*.yaml")
|
FILES_TO_BUILD=$(find . -maxdepth 1 -name "*.yml" -o -name "*.yaml")
|
||||||
else
|
else
|
||||||
echo "Push triggered. Detecting changed files..."
|
echo "Push triggered. Detecting changed files..."
|
||||||
FILES_TO_BUILD=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} 2>/dev/null | grep -E '\.(yml|yaml)$' || true)
|
FILES_TO_BUILD=$(find . -maxdepth 1 -name "*.yml" -o -name "*.yaml")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for file in $FILES_TO_BUILD; do
|
for file in $FILES_TO_BUILD; do
|
||||||
|
|||||||
Reference in new issue
Block a user