Bump the global group with 2 updates (#122) #166
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: Build & Deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '20 0 * * 0' | |
permissions: | |
id-token: write | |
contents: read | |
packages: write | |
jobs: | |
package: | |
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main | |
deploy_internal: | |
name: Deploy Internal | |
needs: | |
- package | |
runs-on: [k8s-public-fmt] | |
container: | |
image: registry.gitlab.com/cmmarslender/kubectl-helm:v3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Vault Login | |
uses: Chia-Network/actions/vault/login@main | |
with: | |
vault_url: ${{ secrets.VAULT_URL }} | |
role_name: github-ecosystem-activity | |
- name: Get secrets from vault | |
uses: hashicorp/vault-action@v3 | |
with: | |
url: ${{ secrets.VAULT_URL }} | |
token: ${{ env.VAULT_TOKEN }} | |
secrets: | | |
secret/data/github_users/chiaautomation/ecosystem-activity token | ECOSYSTEM_ACTIVITY_GITHUB_TOKEN; | |
secret/data/fmt/mysql/db-info host | ECOSYSTEM_ACTIVITY_MYSQL_HOST; | |
secret/data/fmt/mysql/users/ecosystem-write username | ECOSYSTEM_ACTIVITY_MYSQL_USER; | |
secret/data/fmt/mysql/users/ecosystem-write password | ECOSYSTEM_ACTIVITY_MYSQL_PASSWORD; | |
secret/data/github/ghcr_image_pull username | IMAGE_PULL_USERNAME; | |
secret/data/github/ghcr_image_pull password | IMAGE_PULL_PASSWORD; | |
secret/data/fmt/k8s/k8s-fmt api_server_url | K8S_API_SERVER_URL; | |
- name: Login to k8s cluster | |
uses: Chia-Network/actions/vault/k8s-login@main | |
with: | |
vault_url: ${{ secrets.VAULT_URL }} | |
vault_token: ${{ env.VAULT_TOKEN }} | |
backend_name: k8s-fmt | |
role_name: github-actions | |
cluster_url: ${{ env.K8S_API_SERVER_URL }} | |
- uses: Chia-Network/actions/k8s/image-pull-secret@main | |
with: | |
secret_name: ecosystem-activity-image-pull | |
namespace: ecosystem-activity | |
username: ${{ env.IMAGE_PULL_USERNAME }} | |
password: ${{ env.IMAGE_PULL_PASSWORD }} | |
docker_server: "ghcr.io" | |
- uses: Chia-Network/actions/helm/deploy@main | |
env: | |
DOCKER_TAG: "sha-${{ github.sha }}" | |
with: | |
namespace: "ecosystem-activity" | |
app_name: "ecosystem-activity" | |
helm_chart_repo: "https://chia-network.github.io/helm-charts" | |
helm_chart: "generic" | |
helm_values: "./k8s/on-prem.yaml" |