Fake data #1
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: Fake data | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: GitHub environment to regenerate example data | |
type: choice | |
default: test | |
options: | |
- development | |
- test | |
jobs: | |
regenerate: | |
name: Regenerate | |
runs-on: ubuntu-latest | |
environment: ${{ github.event.inputs.environment }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- uses: ./.github/actions/set-kubernetes-credentials | |
with: | |
environment: ${{ github.event.inputs.environment }} | |
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Seed database and regenerate example data | |
run: | | |
kubectl exec \ | |
-n tra-${{ github.event.inputs.environment }} \ | |
deployment/apply-for-qts-${{ github.event.inputs.environment }}-web \ | |
-- sh -c "cd /app && /usr/local/bin/bundle exec rails db:seed fake_data:regenerate" |