mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-28 16:52:26 +01:00
Refactor onpush_builder.yaml to remove addons_json input
Removed input for addons_json from workflow call and adjusted logic for processing add-ons based on push events.
This commit is contained in:
16
.github/workflows/onpush_builder.yaml
vendored
16
.github/workflows/onpush_builder.yaml
vendored
@@ -4,12 +4,6 @@ name: Builder
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
addons_json:
|
||||
description: JSON array of add-on directories to process. If empty, all add-ons are discovered.
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@@ -34,18 +28,10 @@ jobs:
|
||||
|
||||
- name: Find add-on directories to process
|
||||
id: find_addons
|
||||
env:
|
||||
INPUT_ADDONS_JSON: ${{ inputs.addons_json }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
if [ -n "${INPUT_ADDONS_JSON:-}" ]; then
|
||||
if ! jq -e 'type == "array" and all(.[]; type == "string")' <<<"$INPUT_ADDONS_JSON" >/dev/null; then
|
||||
echo "workflow_call input addons_json must be a JSON array of strings" >&2
|
||||
exit 1
|
||||
fi
|
||||
changed_addons=$(jq -c 'map(select(length > 0)) | unique' <<<"$INPUT_ADDONS_JSON")
|
||||
elif [ "${{ github.event_name }}" = "push" ]; then
|
||||
if [ "${{ github.event_name }}" = "push" ]; then
|
||||
before="${{ github.event.before }}"
|
||||
if [ -n "$before" ] && [ "$before" != "0000000000000000000000000000000000000000" ]; then
|
||||
git fetch --no-tags --depth=1 origin "$before" || true
|
||||
|
||||
Reference in New Issue
Block a user