Skip to content

Commit 2f83dc7

Browse files
authored
Merge pull request #13 from stackhpc/upgrade-0.21.1
Sync changes from upstream v0.22.0
2 parents 5a1a6c0 + 1de8881 commit 2f83dc7

File tree

1,877 files changed

+165747
-81781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,877 files changed

+165747
-81781
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "❤️‍🔥ᴬᴳᴱᴺᵀ Agent scenario request"
2+
description: Propose a agent scenario request for RAGFlow.
3+
title: "[Agent Scenario Request]: "
4+
labels: ["❤️‍🔥ᴬᴳᴱᴺᵀ agent scenario"]
5+
body:
6+
- type: checkboxes
7+
attributes:
8+
label: Self Checks
9+
description: "Please check the following in order to be responded in time :)"
10+
options:
11+
- label: I have searched for existing issues [search for existing issues](https://github.com/infiniflow/ragflow/issues), including closed ones.
12+
required: true
13+
- label: I confirm that I am using English to submit this report ([Language Policy](https://github.com/infiniflow/ragflow/issues/5910)).
14+
required: true
15+
- label: Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) ([Language Policy](https://github.com/infiniflow/ragflow/issues/5910)).
16+
required: true
17+
- label: "Please do not modify this template :) and fill in all the required fields."
18+
required: true
19+
- type: textarea
20+
attributes:
21+
label: Is your feature request related to a scenario?
22+
description: |
23+
A clear and concise description of what the scenario is. Ex. I'm always frustrated when [...]
24+
render: Markdown
25+
validations:
26+
required: false
27+
- type: textarea
28+
attributes:
29+
label: Describe the feature you'd like
30+
description: A clear and concise description of what you want to happen.
31+
validations:
32+
required: true
33+
- type: textarea
34+
attributes:
35+
label: Documentation, adoption, use case
36+
description: If you can, explain some scenarios how users might use this, situations it would be helpful in. Any API designs, mockups, or diagrams are also helpful.
37+
render: Markdown
38+
validations:
39+
required: false
40+
- type: textarea
41+
attributes:
42+
label: Additional information
43+
description: |
44+
Add any other context or screenshots about the feature request here.
45+
validations:
46+
required: false

.github/workflows/release.yml

Lines changed: 29 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,103 +16,79 @@ concurrency:
1616

1717
jobs:
1818
release:
19-
runs-on: [ "self-hosted", "overseas" ]
19+
runs-on: [ "self-hosted", "ragflow-test" ]
2020
steps:
2121
- name: Ensure workspace ownership
22-
run: echo "chown -R $USER $GITHUB_WORKSPACE" && sudo chown -R $USER $GITHUB_WORKSPACE
22+
run: echo "chown -R ${USER} ${GITHUB_WORKSPACE}" && sudo chown -R ${USER} ${GITHUB_WORKSPACE}
2323

2424
# https://github.com/actions/checkout/blob/v3/README.md
2525
- name: Check out code
2626
uses: actions/checkout@v4
2727
with:
28-
token: ${{ secrets.MY_GITHUB_TOKEN }} # Use the secret as an environment variable
28+
token: ${{ secrets.GITHUB_TOKEN }} # Use the secret as an environment variable
2929
fetch-depth: 0
3030
fetch-tags: true
3131

3232
- name: Prepare release body
3333
run: |
34-
if [[ $GITHUB_EVENT_NAME == 'create' ]]; then
34+
if [[ ${GITHUB_EVENT_NAME} == "create" ]]; then
3535
RELEASE_TAG=${GITHUB_REF#refs/tags/}
36-
if [[ $RELEASE_TAG == 'nightly' ]]; then
36+
if [[ ${RELEASE_TAG} == "nightly" ]]; then
3737
PRERELEASE=true
3838
else
3939
PRERELEASE=false
4040
fi
41-
echo "Workflow triggered by create tag: $RELEASE_TAG"
41+
echo "Workflow triggered by create tag: ${RELEASE_TAG}"
4242
else
4343
RELEASE_TAG=nightly
4444
PRERELEASE=true
4545
echo "Workflow triggered by schedule"
4646
fi
47-
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
48-
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
47+
echo "RELEASE_TAG=${RELEASE_TAG}" >> ${GITHUB_ENV}
48+
echo "PRERELEASE=${PRERELEASE}" >> ${GITHUB_ENV}
4949
RELEASE_DATETIME=$(date --rfc-3339=seconds)
50-
echo Release $RELEASE_TAG created from $GITHUB_SHA at $RELEASE_DATETIME > release_body.md
50+
echo Release ${RELEASE_TAG} created from ${GITHUB_SHA} at ${RELEASE_DATETIME} > release_body.md
5151
5252
- name: Move the existing mutable tag
5353
# https://github.com/softprops/action-gh-release/issues/171
5454
run: |
5555
git fetch --tags
56-
if [[ $GITHUB_EVENT_NAME == 'schedule' ]]; then
56+
if [[ ${GITHUB_EVENT_NAME} == "schedule" ]]; then
5757
# Determine if a given tag exists and matches a specific Git commit.
5858
# actions/checkout@v4 fetch-tags doesn't work when triggered by schedule
59-
if [ "$(git rev-parse -q --verify "refs/tags/$RELEASE_TAG")" = "$GITHUB_SHA" ]; then
60-
echo "mutable tag $RELEASE_TAG exists and matches $GITHUB_SHA"
59+
if [ "$(git rev-parse -q --verify "refs/tags/${RELEASE_TAG}")" = "${GITHUB_SHA}" ]; then
60+
echo "mutable tag ${RELEASE_TAG} exists and matches ${GITHUB_SHA}"
6161
else
62-
git tag -f $RELEASE_TAG $GITHUB_SHA
63-
git push -f origin $RELEASE_TAG:refs/tags/$RELEASE_TAG
64-
echo "created/moved mutable tag $RELEASE_TAG to $GITHUB_SHA"
62+
git tag -f ${RELEASE_TAG} ${GITHUB_SHA}
63+
git push -f origin ${RELEASE_TAG}:refs/tags/${RELEASE_TAG}
64+
echo "created/moved mutable tag ${RELEASE_TAG} to ${GITHUB_SHA}"
6565
fi
6666
fi
6767
6868
- name: Create or overwrite a release
6969
# https://github.com/actions/upload-release-asset has been replaced by https://github.com/softprops/action-gh-release
7070
uses: softprops/action-gh-release@v2
7171
with:
72-
token: ${{ secrets.MY_GITHUB_TOKEN }} # Use the secret as an environment variable
72+
token: ${{ secrets.GITHUB_TOKEN }} # Use the secret as an environment variable
7373
prerelease: ${{ env.PRERELEASE }}
7474
tag_name: ${{ env.RELEASE_TAG }}
7575
# The body field does not support environment variable substitution directly.
7676
body_path: release_body.md
7777

78-
# https://github.com/marketplace/actions/docker-login
79-
- name: Login to Docker Hub
80-
uses: docker/login-action@v3
81-
with:
82-
username: infiniflow
83-
password: ${{ secrets.DOCKERHUB_TOKEN }}
84-
85-
# https://github.com/marketplace/actions/build-and-push-docker-images
86-
- name: Build and push full image
87-
uses: docker/build-push-action@v6
88-
with:
89-
context: .
90-
push: true
91-
tags: infiniflow/ragflow:${{ env.RELEASE_TAG }}
92-
file: Dockerfile
93-
platforms: linux/amd64
94-
95-
# https://github.com/marketplace/actions/build-and-push-docker-images
96-
- name: Build and push slim image
97-
uses: docker/build-push-action@v6
98-
with:
99-
context: .
100-
push: true
101-
tags: infiniflow/ragflow:${{ env.RELEASE_TAG }}-slim
102-
file: Dockerfile
103-
build-args: LIGHTEN=1
104-
platforms: linux/amd64
105-
106-
- name: Build ragflow-sdk
78+
- name: Build and push ragflow-sdk
10779
if: startsWith(github.ref, 'refs/tags/v')
10880
run: |
109-
cd sdk/python && \
110-
uv build
81+
cd sdk/python && uv build && uv publish --token ${{ secrets.PYPI_API_TOKEN }}
11182
112-
- name: Publish package distributions to PyPI
83+
- name: Build and push ragflow-cli
11384
if: startsWith(github.ref, 'refs/tags/v')
114-
uses: pypa/gh-action-pypi-publish@release/v1
115-
with:
116-
packages-dir: sdk/python/dist/
117-
password: ${{ secrets.PYPI_API_TOKEN }}
118-
verbose: true
85+
run: |
86+
cd admin/client && uv build && uv publish --token ${{ secrets.PYPI_API_TOKEN }}
87+
88+
- name: Build and push image
89+
run: |
90+
sudo docker login --username infiniflow --password-stdin <<< ${{ secrets.DOCKERHUB_TOKEN }}
91+
sudo docker build --build-arg NEED_MIRROR=1 -t infiniflow/ragflow:${RELEASE_TAG} -f Dockerfile .
92+
sudo docker tag infiniflow/ragflow:${RELEASE_TAG} infiniflow/ragflow:latest
93+
sudo docker push infiniflow/ragflow:${RELEASE_TAG}
94+
sudo docker push infiniflow/ragflow:latest

0 commit comments

Comments
 (0)