60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
name: Budibase Release Selfhost
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Tag and release Docker images (Self Host)
|
|
run: |
|
|
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
|
|
|
# Get latest release version
|
|
sudo apt-get install -y jq
|
|
release_version=$(cat lerna.json | jq -r '.version')
|
|
echo "::set-output name=release_version::$release_version"
|
|
release_tag=v$release_version
|
|
|
|
# Pull apps and worker images
|
|
docker pull budibase/apps:$release_tag
|
|
docker pull budibase/worker:$release_tag
|
|
|
|
# Tag apps and worker images
|
|
docker tag budibase/apps:$release_tag budibase/apps:$SELFHOST_TAG
|
|
docker tag budibase/worker:$release_tag budibase/worker:$SELFHOST_TAG
|
|
|
|
# Push images
|
|
docker push budibase/apps:$SELFHOST_TAG
|
|
docker push budibase/worker:$SELFHOST_TAG
|
|
env:
|
|
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }}
|
|
SELFHOST_TAG: latest
|
|
|
|
- name: Setup Helm
|
|
uses: azure/setup-helm@v1
|
|
id: helm-install
|
|
|
|
- name: Build and release helm chart
|
|
run: |
|
|
git config user.name "Budibase Helm Bot"
|
|
git config user.email "<>"
|
|
helm package charts/budibase
|
|
git checkout gh-pages
|
|
mv budibase-${{ github.steps.version.outputs.release_version }}.tgz docs
|
|
git add -A
|
|
git commit -m "Helm Release: ${{ github.steps.version.outputs.release_version }}"
|
|
git push
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Perform Github Release
|
|
uses: softprops/action-gh-release@v1
|
|
name: v${{ github.steps.version.outputs.release_version }}
|
|
with:
|
|
generate_release_notes: true |