mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Update onpush_builder.yaml
This commit is contained in:
37
.github/workflows/onpush_builder.yaml
vendored
37
.github/workflows/onpush_builder.yaml
vendored
@@ -16,25 +16,24 @@ env:
|
||||
|
||||
jobs:
|
||||
# 1. Detect which add-on folders changed (by config.json|yaml|yml modification)
|
||||
detect-changed-addons:
|
||||
if: ${{ github.repository_owner == 'alexbelgium' && !contains(github.event.head_commit.message, 'nobuild') }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changedAddons: ${{ steps.find_addons.outputs.changed_addons }}
|
||||
dockerfile_exists: ${{ steps.dockerfile_check.outputs.dockerfile_exists }}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Find changed addon directories
|
||||
id: find_addons
|
||||
run: |
|
||||
git fetch origin "${{ github.event.before }}" || true
|
||||
changed_config_files=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" | grep -E '^[^/]+/config\.(json|ya?ml)$' || true)
|
||||
echo "Changed config files:"
|
||||
echo "$changed_config_files"
|
||||
changed_addons=$(echo "$changed_config_files" | awk -F/ '{print $1}' | sort -u | jq -R -s -c 'split("\n")[:-1]')
|
||||
echo "Changed addons: $changed_addons"
|
||||
echo "changed_addons=$changed_addons" >> "$GITHUB_OUTPUT"
|
||||
detect-changed-addons:
|
||||
if: ${{ github.repository_owner == 'alexbelgium' && !contains(github.event.head_commit.message, 'nobuild') }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changedAddons: ${{ steps.find_addons.outputs.changed_addons }}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Find changed addon directories
|
||||
id: find_addons
|
||||
run: |
|
||||
git fetch origin "${{ github.event.before }}" || true
|
||||
changed_config_files=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" | grep -E '^[^/]+/config\.(json|ya?ml)$' || true)
|
||||
echo "Changed config files:"
|
||||
echo "$changed_config_files"
|
||||
changed_addons=$(echo "$changed_config_files" | awk -F/ '{print $1}' | sort -u | jq -R -s -c 'split("\n")[:-1]')
|
||||
echo "Changed addons: $changed_addons"
|
||||
echo "changed_addons=$changed_addons" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# 2. Pre-build sanitize: normalize spaces, fix script permissions, single commit per add-on
|
||||
prebuild-sanitize:
|
||||
|
||||
Reference in New Issue
Block a user