Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate with gh #17

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
41 changes: 41 additions & 0 deletions .github/workflows/publish_on_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build and Push Custom Component
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Let's also add a testing step in the CI + documentation (e.g. how to trigger, where to put API key etc.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArzelaAscoIi How about also adding a flow on: pullrequest which runs the linting + testing steps?


on:
push:
tags:
- 'v*.*.*'

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install hatch

- name: Set version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
hatch version $VERSION

- name: Check repository
id: check_repo
run: |
if [ "${{ github.repository }}" = "deepset-ai/deepset-cloud-custom-nodes" ]; then
echo "skip_build=true" >> $GITHUB_OUTPUT
else
echo "skip_build=false" >> $GITHUB_OUTPUT
fi

- name: Build and push
if: steps.check_repo.outputs.skip_build == 'false'
env:
API_KEY: ${{ secrets.DEEPSET_CLOUD_API_KEY }} # Make sure to add this secret to your repository
run: hatch run dc:build-and-push