This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [GuillaumeFalourd/branch-exists](https://github.com/GuillaumeFalourd/branch-exists) | action | pinDigest | → `0092904` | | [actions/cache](https://github.com/actions/cache) | action | pinDigest | → `6682284` | | [actions/checkout](https://github.com/actions/checkout) | action | pinDigest | → `de0fac2` | | [actions/setup-node](https://github.com/actions/setup-node) | action | pinDigest | → `53b8394` | | [azure/k8s-set-context](https://github.com/azure/k8s-set-context) | action | pinDigest | → `ae59a72` | | [azure/setup-helm](https://github.com/azure/setup-helm) | action | pinDigest | → `1a275c3` | | docker.io/postgres | | pinDigest | → `44d837e` | | dxflrs/garage | | pinDigest | → `45a61ce` | | [favonia/cloudflare-ddns](https://github.com/favonia/cloudflare-ddns) | | pinDigest | → `a4e2089` | | [ghcr.io/0xerr0r/blocky](https://github.com/0xERR0R/blocky) | | pinDigest | → `a6d99f3` | | ghcr.io/ai-dock/stable-diffusion-webui | | pinDigest | → `bc4b2b1` | | [ghcr.io/dmunozv04/isponsorblocktv](https://github.com/dmunozv04/iSponsorBlockTV) | | pinDigest | → `5458565` | | ghcr.io/gabe565/castsponsorskip | | pinDigest | → `f556d27` | | [ghcr.io/gethomepage/homepage](https://github.com/gethomepage/homepage) | | pinDigest | → `b129cb0` | | ghcr.io/moghtech/komodo-periphery | | pinDigest | → `bd79cf9` | | [ghcr.io/renovatebot/renovate](https://renovatebot.com) ([source](https://github.com/renovatebot/renovate)) | container | pinDigest | → `9228574` | | [ghcr.io/tailscale/tailscale](https://tailscale.com/kb/1282/docker) ([source](https://github.com/tailscale/tailscale)) | | pinDigest | → `95e5287` | | ghcr.io/tailscale/tailscale | | pinDigest | → `95e5287` | | [ghcr.io/tecnativa/docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy) | | pinDigest | → `1f3a6f3` | | [ghcr.io/traefik/traefik](https://hub.docker.com/_/traefik) ([source](https://github.com/traefik/traefik-library-image)) | | pinDigest | → `acfc806` | | [gitea/gitea](https://github.com/go-gitea/gitea) | | pinDigest | → `f846d26` | | khairul169/garage-webui | | pinDigest | → `17c7935` | | ollama/ollama | | pinDigest | → `5a5d014` | | quay.io/prometheus/node-exporter | | pinDigest | → `337ff1d` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41OS4yIiwidXBkYXRlZEluVmVyIjoiNDMuNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=--> Reviewed-on: #4968 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
135 lines
4.0 KiB
YAML
135 lines
4.0 KiB
YAML
name: lint-test-docker
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'hosts/**'
|
|
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'hosts/**'
|
|
|
|
env:
|
|
BASE_BRANCH: "origin/${{ github.base_ref }}"
|
|
|
|
jobs:
|
|
lint-docker-compose:
|
|
runs-on: ubuntu-js
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Check Branch Exists
|
|
id: check-branch-exists
|
|
if: github.event_name == 'pull_request'
|
|
uses: GuillaumeFalourd/branch-exists@009290475dc3d75b5d7ec680c0c5b614b0d9855d # v1.1
|
|
with:
|
|
branch: "${{ github.base_ref }}"
|
|
|
|
- name: Report Branch Exists
|
|
id: branch-exists
|
|
if: github.event_name == 'push' || steps.check-branch-exists.outputs.exists == 'true' && github.event_name == 'pull_request'
|
|
run: |
|
|
if [ "${{ github.event_name }}" == "push" ]; then
|
|
echo ">> Action is from a push event, will continue with linting"
|
|
|
|
else
|
|
echo ">> Branch ${{ github.base_ref }} exists, will continue with linting"
|
|
|
|
fi
|
|
|
|
echo ""
|
|
echo "----"
|
|
|
|
echo "exists=true" >> $GITHUB_OUTPUT
|
|
|
|
- name: Set Up Node.js
|
|
if: steps.branch-exists.outputs.exists == 'true'
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Check Directories for Changes
|
|
id: check-dir-changes
|
|
if: steps.branch-exists.outputs.exists == 'true'
|
|
run: |
|
|
echo ">> Target branch for diff is: ${BASE_BRANCH}"
|
|
|
|
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
|
DIFF_TARGET="${BASE_BRANCH}"
|
|
echo ""
|
|
echo ">> Checking for changes in a pull request ..."
|
|
|
|
else
|
|
DIFF_TARGET="${{ github.event.before }}..HEAD"
|
|
echo ""
|
|
echo ">> Checking for changes from a push ..."
|
|
|
|
fi
|
|
|
|
CHANGED_COMPOSE=$(git diff --name-only "${DIFF_TARGET}" | grep -E "^hosts/[^/]+/[^/]+/" | cut -d/ -f1,2,3 | sort -u || true)
|
|
|
|
if [ -n "${CHANGED_COMPOSE}" ]; then
|
|
echo ""
|
|
echo ">> Compose to Lint:"
|
|
echo ""
|
|
echo "${CHANGED_COMPOSE}"
|
|
|
|
CHANGED_COMPOSE_CSV=$(echo "$CHANGED_COMPOSE" | paste -sd ',' -)
|
|
|
|
echo ""
|
|
echo "----"
|
|
|
|
echo "changes-detected=true" >> $GITHUB_OUTPUT
|
|
echo "compose-dir-csv=${CHANGED_COMPOSE_CSV}" >> $GITHUB_OUTPUT
|
|
echo "compose-dir<<EOF" >> $GITHUB_OUTPUT
|
|
echo "${CHANGED_COMPOSE}" >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
else
|
|
echo ""
|
|
echo ">> Did not find any docker compose files to lint"
|
|
|
|
echo ""
|
|
echo "----"
|
|
|
|
echo "changes-detected=false" >> $GITHUB_OUTPUT
|
|
|
|
fi
|
|
|
|
- name: Lint Docker Compose
|
|
if: steps.check-dir-changes.outputs.changes-detected == 'true'
|
|
env:
|
|
CHANGED_COMPOSE: ${{ steps.check-dir-changes.outputs.compose-dir }}
|
|
run: |
|
|
echo ">> Running dclint on changed compose files ..."
|
|
|
|
for COMPOSE in $CHANGED_COMPOSE; do
|
|
echo ">> Linting ${COMPOSE} ..."
|
|
npx dclint ${COMPOSE}
|
|
|
|
done
|
|
|
|
echo ""
|
|
echo "----"
|
|
|
|
- name: ntfy Failed
|
|
uses: niniyas/ntfy-action@master
|
|
if: failure()
|
|
with:
|
|
url: '${{ secrets.NTFY_URL }}'
|
|
topic: '${{ secrets.NTFY_TOPIC }}'
|
|
title: 'Docker Compose Test Failure'
|
|
priority: 3
|
|
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
|
|
tags: action,failed
|
|
details: "Docker linting for compose dirs: ${{ steps.check-dir-changes.outputs.compose-dir-csv }}"
|
|
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
|
|
actions: '[{"action": "view", "label": "View Logs", "url": "${{ vars.USER_URL }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", "clear": true}]'
|