test kubernetes connection #8
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: commune-page | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev | |
- drone | |
paths-ignore: | |
- 'apps/commune-governance/**' | |
- 'apps/commune-validator/**' | |
- 'apps/communex-page/**' | |
- 'apps/commune-worker/**' | |
- 'apps/sample-app/**' | |
- 'apps/commune-wallet/**' | |
- 'apps/commune-cache/**' | |
jobs: | |
# build: | |
# uses: ./.github/workflows/docker-build-template.yml | |
# with: | |
# app_name: commune-page | |
deploy: | |
# needs: build | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/renlabs-dev/devops-ci:latest | |
env: | |
VAULT_ADDR: ${{ secrets.VAULT_ADDR }} | |
VAULT_ROLE_ID: ${{ secrets.VAULT_ROLE_ID }} | |
VAULT_SECRET_ID: ${{ secrets.VAULT_SECRET_ID }} | |
APP_NAME: commune-page | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Kubernetes authentication | |
run: /apps/k8s_auth_w_approle_sa.sh | |
- name: Add and update Helm repositories | |
run: | | |
helm repo add renlabs https://charts.renlabs.dev/ | |
helm repo update | |
- id: commit | |
uses: prompt/actions-commit-hash@v3 | |
- name: Set environment variables | |
run: | | |
echo "ENV_NAME=${{ github.ref_name == 'main' && 'prod' || 'dev' }}" >> $GITHUB_ENV | |
- run: | | |
kubectl get nodes | |
kubectl get pods -n commune-dev-web-apps | |
# - name: Install shared resources | |
# run: | | |
# helm template commune-${ENV_NAME}-aux \ | |
# -f helm/values-utils.yaml \ | |
# -n commune-${ENV_NAME}-web-apps \ | |
# --set environmentName=${ENV_NAME} \ | |
# renlabs/utils | kubectl apply -f - | |
# - name: Deploy application | |
# working-directory: apps/${{ env.APP_NAME }} | |
# run: | | |
# helmfile sync -e ${ENV_NAME} --set deployment.image.tag=${{ steps.commit.outputs.short }} |