Add support for Weaviate unprivileged docker images #309
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '**' | |
pull_request: | |
jobs: | |
create-helm-chart: | |
name: Test and release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Test | |
run: ./.cicd/test.sh | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: .cicd/release.sh | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
generate_release_notes: true | |
draft: true | |
files: weaviate/weaviate.tgz | |
create-gh-page: | |
name: create gh page | |
runs-on: ubuntu-latest | |
needs: create-helm-chart | |
if: startsWith(github.ref, 'refs/tags/') | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# chartpress requires git history to set chart version and image tags | |
# correctly | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.10.2 | |
- name: Install chart publishing dependencies (chartpress, helm) | |
run: pip install chartpress | |
- name: Setup push rights to jupyterhub/helm-chart | |
# This was setup by... | |
# 1. Generating a private/public key pair: | |
# ssh-keygen -t ed25519 -C "weaviate/weaviate-helm" -f ./deploy_key | |
# 2. Registering the private key (./deploy_key) as a secret for this | |
# repo: | |
# https://github.com/weaviate/weaviate-helm/settings/secrets/actions | |
# 3. Registering the public key (./deploy_key.pub) as a deploy key | |
# with push rights for the jupyterhub/helm chart repo: | |
# https://github.com/weaviate/weaviate-helm/settings/keys | |
run: | | |
mkdir -p ~/.ssh | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
echo "${{ secrets.WEAVIATE_HELM_CHART_DEPLOY_KEY }}" > ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
- name: Configure a git user | |
# Having a user.email and user.name configured with git is required to | |
# make commits, which is something chartpress does when publishing. | |
# While Travis CI had a dummy user by default, GitHub Actions doesn't | |
# and require this explicitly setup. | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions user" | |
- name: Run chart-releaser | |
run: chartpress --publish-chart |