changes #8
Workflow file for this run
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: DB Change Checks | |
on: | |
push | |
jobs: | |
check-sql-schema-changes: | |
runs-on: github-dev-runner | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: tj-actions/changed-files@v44 | |
id: changed-db-files | |
with: | |
files: | | |
- "/app" | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
if: steps.check-sql-schema-changes.outputs.any_changed == 'true' | |
with: | |
python-version: '3.11' | |
- name: Generate branch name | |
id: generate-branch-name | |
run: | | |
TIMESTAMP=$(date +'%Y%m%d%H%M%S') | |
BRANCH_NAME="my-branch-$TIMESTAMP" | |
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | |
- name: Checkout new branch | |
id: checkout-new-branch | |
run: | | |
git checkout -b ${{ env.BRANCH_NAME }} | |
git push origin ${{ env.BRANCH_NAME }} | |
- name: Create PR | |
id: create-pull-request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
branch: ${{ env.BRANCH_NAME }} | |
base: main | |
title: "Create a new branch" | |
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" | |
# run-alembic-script-gen: | |
# open-pr: | |
# tag-someone: | |