Skip to content

Commit

Permalink
Prevent create, recreate or delete when database name is patriot_pay (#6
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Marco authored Dec 20, 2024
1 parent b927d5b commit cbf5519
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,23 @@ inputs:
required: false
default: 'Service'

# NOTE: we do not want to Create, Recreate, or Delete when database name is patriot_pay

runs:
using: 'composite'
env:
DATABASE: ${{ inputs.database_name }}
USERNAME: ${{ inputs.github_actor }}
SOURCE_DB: ${{ inputs.source_database_name }}
ACTION: ${{ inputs.branch_action }}
DB_CLUSTER: ${{ inputs.database_cluster }}
steps:
- if: |
inputs.database_name == '' ||
inputs.github_actor == '' ||
inputs.database_name == 'master' ||
inputs.database_name == '' ||
inputs.database_name == 'main' ||
inputs.database_name == 'master' ||
inputs.database_name == 'patriot_pay' ||
(inputs.branch_action != 'Delete' && inputs.source_database_name == '')
shell: bash
run: |
Expand All @@ -57,13 +66,7 @@ runs:
aws-secret-access-key: ${{ inputs.aws_secret_key }}
aws-region: ${{ inputs.aws_region }}

- env:
DATABASE: ${{ inputs.database_name }}
USERNAME: ${{ inputs.github_actor }}
SOURCE_DB: ${{ inputs.source_database_name }}
ACTION: ${{ inputs.branch_action }}
DB_CLUSTER: ${{ inputs.database_cluster }}
shell: bash
- shell: bash
run: bash ${{ github.action_path }}/script.sh

- name: Upload Dump.sql
Expand Down

0 comments on commit cbf5519

Please sign in to comment.