Skip to content

Commit

Permalink
refactor: clean CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
neolectron committed Sep 19, 2024
1 parent f6f8785 commit 0523240
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/create-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ on:
description: 'Username'
required: true
type: string
first_name:
description: 'First name'
required: false
type: string
last_name:
description: 'Last name'
required: false
type: string
password:
description: 'Password'
required: true
Expand Down Expand Up @@ -39,7 +47,13 @@ jobs:

- name: '`docker compose run php artisan p:user:mak` on the production server'
working-directory: .
run: docker --context prod-server compose run --rm panel php artisan p:user:make --username=${{ github.event.inputs.username }} --password=${{ github.event.inputs.password }} --email=${{ github.event.inputs.email }} --admin=${{ github.event.inputs.admin == 'true' && 1 || 0 }} --name-first=Change --name-last=Me
run: docker --context prod-server compose run --rm panel php artisan p:user:make \
--username=${{ github.event.inputs.username }} \
--password=${{ github.event.inputs.password }} \
--email=${{ github.event.inputs.email }} \
--admin=${{ github.event.inputs.admin == 'true' && 1 || 0 }} \
--name-first=${{ github.event.inputs.first_name }} \
--name-last=${{ github.event.inputs.last_name }}
env:
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}
3 changes: 2 additions & 1 deletion .github/workflows/remove-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:

- name: '`docker compose run php artisan p:user:delete` on the production server'
working-directory: .
run: docker --context prod-server compose run --rm panel php artisan p:user:delete --user=${{ github.event.inputs.user }} --no-interaction
run: docker --context prod-server compose run --rm panel php artisan p:user:delete --no-interaction \
--user=${{ github.event.inputs.user }}
env:
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}

0 comments on commit 0523240

Please sign in to comment.