feat: Add migration workflow #17
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: Run Migrations with gh-ost | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
jobs: | |
migrations: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
- name: Install Dependencies | |
run: composer install --no-dev --optimize-autoloader | |
- name: Install gh-ost | |
run: | | |
curl -L https://github.com/github/gh-ost/releases/download/v1.1.7/gh-ost-binary-linux-amd64-20241219160321.tar.gz -o gh-ost | |
chmod +x gh-ost | |
sudo mv gh-ost /usr/local/bin/ | |
- name: Set Permissions for gh-ost Script | |
run: chmod +x ./run-gh-ost.sh | |
- name: Run gh-ost Migrations | |
run: ./run-gh-ost.sh |