Skip to content

release new webshell version #60

release new webshell version

release new webshell version #60

Workflow file for this run

name: Build & deploy released Version
on:
push:
tags:
- 'webshell-*'
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Quay.io Container Registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_TOKEN }}
-
name: Login to the ghcr.io Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Get the version # strip away "ref/tags/webshell-"
id: get_version
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/webshell-//g')" >> $GITHUB_OUTPUT
-
name: Build Release Version
uses: docker/build-push-action@v6
with:
context: build
push: true
tags: |
quay.io/acend/theia:${{ steps.get_version.outputs.VERSION }}
ghcr.io/acend/theia:${{ steps.get_version.outputs.VERSION }}
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
-
name: 'Install Helm'
uses: azure/setup-helm@v4
with:
version: v3.6.2
-
name: Install Kubectl
uses: azure/setup-kubectl@v4
with:
version: v1.21.2
-
name: Create KUBECONFIG
env:
KUBE_CONFIG: '${{ secrets.KUBECONFIG_K8S_ACEND }}'
run: |
mkdir -p $HOME/.kube
echo "$KUBE_CONFIG" > $HOME/.kube/config
-
name: Deploy Helm Release
env:
HELM_RELEASE: 'demo-webshell'
NAMESPACE: 'acend-webshell'
PASSWORD: '${{ secrets.WEBSHELL_TEST_PASSWORD }}'
run: |
helm upgrade $HELM_RELEASE webshell --install --wait --kubeconfig $HOME/.kube/config --namespace=$NAMESPACE --repo=https://acend.github.io/webshell-env/ --set password=$PASSWORD --values=deploy/charts/webshell/values-demo.yaml --atomic
-
name: Redeploy Webshell
env:
NAMESPACE: 'acend-webshell'
HELM_RELEASE: 'demo-webshell'
run: |
kubectl rollout restart deployment/$HELM_RELEASE --kubeconfig $HOME/.kube/config --namespace $NAMESPACE