Skip to content

Commit

Permalink
Add release workflow to update database
Browse files Browse the repository at this point in the history
  • Loading branch information
rukmal committed Sep 20, 2022
1 parent 355d221 commit df437f3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release workflow

on:
release:
types: [published]

jobs:
update-staging-db:
name: Update Azure staging database
runs-on: ubuntu-22.04
environment: Staging
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Update Azure staging database
run: mysql --host=$HOST --port=$PORT --user=$USER --password=$PASSWORD $DATABASE < cat ./db/schema/*.sql
env:
HOST: ${{ secrets.DB_HOST }}
PORT: ${{ secrets.DB_PORT }}
USER: ${{ secrets.DB_USER }}
PASSWORD: ${{ secrets.DB_PASSWORD }}
DATABASE: ${{ secrets.DB_DATABASE }}

0 comments on commit df437f3

Please sign in to comment.