Tools #343
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: Tools | |
# Rebuild shared Docker images | |
on: | |
push: | |
paths: | |
- tools/** | |
schedule: | |
- cron: "30 5 * * MON-FRI" # Every weekday at 05:30 UTC | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'schedule' && (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch') }} | |
strategy: | |
fail-fast: false | |
matrix: | |
project: | |
- feature-flags | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Authenticate | |
uses: ./.github/actions/cloud-platform-auth | |
with: | |
api: ${{ secrets.KUBE_ENV_API }} | |
cert: ${{ secrets.KUBE_CERT }} | |
cluster: ${{ secrets.KUBE_CLUSTER }} | |
namespace: ${{ secrets.KUBE_NAMESPACE }} | |
token: ${{ secrets.KUBE_TOKEN }} | |
- name: Deploy | |
shell: bash | |
run: | | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
brew install helm | |
helm dependency update . | |
helm upgrade "$PROJECT" . \ | |
--atomic \ | |
--history-max 10 \ | |
--install \ | |
--reset-values \ | |
--timeout 10m \ | |
--values values.yaml \ | |
--wait | |
working-directory: tools/${{ matrix.project }}/deploy | |
env: | |
PROJECT: ${{ matrix.project }} | |
deploy-auth: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'schedule' && (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm install -g auth0-deploy-cli | |
- name: Import Auth0 configuration | |
working-directory: tools/feature-flags/deploy/auth0 | |
env: | |
AUTH0_CLIENT_ID: ${{ secrets.FLIPT_AUTH0_CLIENT_ID }} | |
AUTH0_CLIENT_SECRET: ${{ secrets.FLIPT_AUTH0_CLIENT_SECRET }} | |
run: a0deploy import --input_file tenant.yaml --config_file config.json |