haystack/.github/workflows/sync_code_to_deepset.yml
dependabot[bot] e3d4e9e945
chore(deps): bump tj-actions/changed-files from 46 to 47 (#9788)
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 46 to 47.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v46...v47)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '47'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 16:41:45 +02:00

57 lines
1.7 KiB
YAML

name: Upload Code to Deepset
on:
push:
branches:
- main
jobs:
upload-files:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for proper diff
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
run: |
pip install uv
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
with:
files: |
haystack/**/*.py
separator: ' '
- name: Upload files to Deepset
if: steps.changed-files.outputs.any_changed == 'true' || steps.changed-files.outputs.any_deleted == 'true'
env:
DEEPSET_API_KEY: ${{ secrets.DEEPSET_API_KEY }}
DEEPSET_WORKSPACE: haystack-code
run: |
# Combine added and modified files for upload
CHANGED_FILES=""
if [ -n "${{ steps.changed-files.outputs.added_files }}" ]; then
CHANGED_FILES="${{ steps.changed-files.outputs.added_files }}"
fi
if [ -n "${{ steps.changed-files.outputs.modified_files }}" ]; then
if [ -n "$CHANGED_FILES" ]; then
CHANGED_FILES="$CHANGED_FILES ${{ steps.changed-files.outputs.modified_files }}"
else
CHANGED_FILES="${{ steps.changed-files.outputs.modified_files }}"
fi
fi
# Run the script with changed and deleted files
# shellcheck disable=SC2086
uv run --no-project --no-config --no-cache .github/utils/deepset_sync.py \
--changed $CHANGED_FILES \
--deleted ${{ steps.changed-files.outputs.deleted_files }}