Intègre les indicateurs existants dans Metabase (#1120) #3
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: Metabase Migrate | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/Infrastructure/Persistence/Doctrine/MetabaseMigrations/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install Scalingo CLI | |
run: curl -O https://cli-dl.scalingo.com/install && bash install | |
- name: Install SSH key | |
# Credit: https://stackoverflow.com/a/69234389 | |
run: | | |
mkdir -p ~/.ssh | |
install -m 600 -D /dev/null ~/.ssh/id_rsa | |
echo "${{ secrets.GH_SCALINGO_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
- name: Add Scalingo as a known host | |
run: | | |
ssh-keyscan -H ssh.osc-fr1.scalingo.com >> ~/.ssh/known_hosts | |
- name: Init environment variables | |
run: | | |
echo "METABASE_DATABASE_URL=${{ secrets.METABASE_MIGRATIONS_METABASE_DATABASE_URL }}" >> .env.local | |
- name: CI | |
run: make ci_metabase_migrate BIN_COMPOSER="composer" BIN_CONSOLE="php bin/console" |