Skip to content

Commit 2daf628

Browse files
committed
ci: add remove user workflow event
1 parent f277225 commit 2daf628

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/remove-user.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
user:
5+
description: 'username/email/UUID'
6+
required: false
7+
type: string
8+
9+
jobs:
10+
create-user:
11+
runs-on: ubuntu-latest
12+
name: 'Create pterodactyl user'
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: arwynfr/actions-docker-context@v2
18+
with:
19+
docker_host: 'ssh://${{ secrets.CODINGLABGG_SSH_USER }}@${{ secrets.CODINGLABGG_SSH_HOST }}'
20+
context_name: 'prod-server'
21+
ssh_key: ${{ secrets.CODINGLABGG_SSH_KEY }}
22+
ssh_cert: ${{ secrets.CODINGLABGG_SSH_CERT }}
23+
24+
- name: '`docker compose run php artisan p:user:mak` on the production server'
25+
working-directory: .
26+
run: docker --context prod-server compose run --rm panel php artisan p:user:delete --user=${{ github.event.inputs.user }}
27+
env:
28+
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
29+
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}

0 commit comments

Comments
 (0)