mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-19 23:31:50 +02: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:
|
jobs:
|
||||||
# 1. Detect which add-on folders changed (by config.json|yaml|yml modification)
|
# 1. Detect which add-on folders changed (by config.json|yaml|yml modification)
|
||||||
detect-changed-addons:
|
detect-changed-addons:
|
||||||
if: ${{ github.repository_owner == 'alexbelgium' && !contains(github.event.head_commit.message, 'nobuild') }}
|
if: ${{ github.repository_owner == 'alexbelgium' && !contains(github.event.head_commit.message, 'nobuild') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
changedAddons: ${{ steps.find_addons.outputs.changed_addons }}
|
changedAddons: ${{ steps.find_addons.outputs.changed_addons }}
|
||||||
dockerfile_exists: ${{ steps.dockerfile_check.outputs.dockerfile_exists }}
|
steps:
|
||||||
steps:
|
- name: Checkout repo
|
||||||
- name: Checkout repo
|
uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- name: Find changed addon directories
|
||||||
- name: Find changed addon directories
|
id: find_addons
|
||||||
id: find_addons
|
run: |
|
||||||
run: |
|
git fetch origin "${{ github.event.before }}" || true
|
||||||
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)
|
||||||
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:"
|
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]')
|
||||||
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"
|
echo "changed_addons=$changed_addons" >> "$GITHUB_OUTPUT"
|
||||||
echo "changed_addons=$changed_addons" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
# 2. Pre-build sanitize: normalize spaces, fix script permissions, single commit per add-on
|
# 2. Pre-build sanitize: normalize spaces, fix script permissions, single commit per add-on
|
||||||
prebuild-sanitize:
|
prebuild-sanitize:
|
||||||
|
|||||||
Reference in New Issue
Block a user