name: Atlas Migrate (dev) on: push: branches: - main jobs: migrate: runs-on: mealcraft-runners steps: - name: Checkout repo uses: actions/checkout@v4 # Install Atlas - name: Install Atlas CLI run: | curl -sSf https://atlasgo.sh | sh # Load DB creds from Kubernetes secret - name: Load Postgres credentials run: | export POSTGRES_USER=$(kubectl get secret postgres-secret -o jsonpath='{.data.POSTGRES_USER}' | base64 -d) export POSTGRES_PASSWORD=$(kubectl get secret postgres-secret -o jsonpath='{.data.POSTGRES_PASSWORD}' | base64 -d) echo "POSTGRES_USER=$POSTGRES_USER" >> $GITHUB_ENV echo "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" >> $GITHUB_ENV # Run Atlas migrations (DEV only) - name: Run Atlas migrations (dev) run: | atlas migrate apply \ --env stripe_invoice_dev \ --dir file://db/atlas/stripe_invoice/migrations