Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions .github/workflows/sync-lightspeed-configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix:
branch:
- release-1.10
- release-2.1

concurrency:
group: ${{ github.workflow }}-${{ matrix.branch }}
Expand Down Expand Up @@ -46,18 +47,18 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Sync Lightspeed Core config files
- name: Sync Lightspeed Core config files and check for changes
id: changes
run: |
./hack/sync-lightspeed-configs.sh --ref ${{ matrix.branch }}
Comment thread
rm3l marked this conversation as resolved.

if [[ "${{ matrix.branch }}" == "release-1.10" ]]; then
./hack/sync-lightspeed-configs.sh --repo redhat-ai-dev/lightspeed-configs --ref ${{ matrix.branch }}
CHANGE_PATHS=(config/profile/rhdh/default-config/flavours/lightspeed/ examples/lightspeed.yaml)
else
./hack/sync-lightspeed-configs.sh --ref ${{ matrix.branch }}
CHANGE_PATHS=(config/profile/rhdh/default-config/flavours/intelligent-assistant/ config/profile/rhdh/default-config/flavours/intelligent-assistant-okp/ examples/intelligent-assistant.yaml)
fi

- name: Check for changes
id: changes
run: |
if git diff --quiet config/profile/rhdh/default-config/flavours/intelligent-assistant/ examples/intelligent-assistant.yaml; then
if git diff --quiet -- "${CHANGE_PATHS[@]}"; then
echo "No changes from upstream."
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
Expand All @@ -81,6 +82,14 @@ jobs:

if [[ "${TARGET_BRANCH}" == "release-1.10" ]]; then
TARGET_REPO="redhat-ai-dev/lightspeed-configs"
SYNCED_FILES=$(printf '%s\n' \
'- `config/profile/rhdh/default-config/flavours/lightspeed/configmap-files.yaml`' \
'- `examples/lightspeed.yaml`')
else
SYNCED_FILES=$(printf '%s\n' \
'- `config/profile/rhdh/default-config/flavours/intelligent-assistant/configmap-files.yaml`' \
'- `config/profile/rhdh/default-config/flavours/intelligent-assistant-okp/configmap-files.yaml`' \
'- `examples/intelligent-assistant.yaml`')
fi

EXISTING_PR=$(gh pr list --head "${BRANCH}" --base "${TARGET_BRANCH}" --state open --json number --jq '.[0].number // empty')
Expand All @@ -104,8 +113,7 @@ jobs:
Automated nightly sync of Lightspeed Core config files from [${TARGET_REPO} @ ${TARGET_BRANCH}](https://github.com/${TARGET_REPO}/tree/${TARGET_BRANCH}).

### Synced files
- \`config/profile/rhdh/default-config/flavours/intelligent-assistant/configmap-files.yaml\`
- \`examples/intelligent-assistant.yaml\`
${SYNCED_FILES}

> [!CAUTION]
> Please review the upstream changes carefully before merging.
Expand Down
Loading