Add temporary Azeroth host permission probe
This commit is contained in:
@@ -0,0 +1,84 @@
|
|||||||
|
name: Azeroth Host Permission Probe
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
runner:
|
||||||
|
description: 'Target runner'
|
||||||
|
required: true
|
||||||
|
default: 'azerothai-host'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
permission-probe:
|
||||||
|
runs-on: ${{ github.event.inputs.runner }}
|
||||||
|
if: ${{ github.event.inputs.runner == 'azerothai-host' }}
|
||||||
|
steps:
|
||||||
|
- name: Verify workflow metadata
|
||||||
|
run: |
|
||||||
|
echo "=== Workflow Metadata Check ==="
|
||||||
|
echo "Actor: ${{ github.actor }}"
|
||||||
|
echo "Repository: ${{ github.repository }}"
|
||||||
|
if [ "${{ github.actor }}" != "richard" ]; then
|
||||||
|
echo "ERROR: Expected actor 'richard', got '${{ github.actor }}'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "${{ github.repository }}" != "richard/AzerothAI" ]; then
|
||||||
|
echo "ERROR: Expected repository 'richard/AzerothAI', got '${{ github.repository }}'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Actor and repository verified successfully."
|
||||||
|
|
||||||
|
- name: Gitea metadata check
|
||||||
|
run: |
|
||||||
|
echo "=== Gitea Runner Metadata Check ==="
|
||||||
|
if [ "${GITEA_ACTOR:-}" = "richard" ]; then
|
||||||
|
echo "GITEA_ACTOR verified: $GITEA_ACTOR"
|
||||||
|
else
|
||||||
|
echo "GITEA_ACTOR: ${GITEA_ACTOR:-not set}"
|
||||||
|
fi
|
||||||
|
if [ "${GITEA_REPOSITORY:-}" = "richard/AzerothAI" ]; then
|
||||||
|
echo "GITEA_REPOSITORY verified: $GITEA_REPOSITORY"
|
||||||
|
else
|
||||||
|
echo "GITEA_REPOSITORY: ${GITEA_REPOSITORY:-not set}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Print id
|
||||||
|
run: |
|
||||||
|
echo "=== id ==="
|
||||||
|
id
|
||||||
|
|
||||||
|
- name: Print pwd
|
||||||
|
run: |
|
||||||
|
echo "=== pwd ==="
|
||||||
|
pwd
|
||||||
|
|
||||||
|
- name: Check /home/endami/azerothai-classic-migration
|
||||||
|
run: |
|
||||||
|
echo "=== /home/endami/azerothai-classic-migration ==="
|
||||||
|
ls -ld /home/endami/azerothai-classic-migration
|
||||||
|
echo "test -w check:"
|
||||||
|
test -w /home/endami/azerothai-classic-migration && echo "WRITABLE" || echo "READ-ONLY"
|
||||||
|
|
||||||
|
- name: Check /home/endami/azerothai-classic-migration/app-staging
|
||||||
|
run: |
|
||||||
|
echo "=== /home/endami/azerothai-classic-migration/app-staging ==="
|
||||||
|
ls -ld /home/endami/azerothai-classic-migration/app-staging
|
||||||
|
echo "test -w check:"
|
||||||
|
test -w /home/endami/azerothai-classic-migration/app-staging && echo "WRITABLE" || echo "READ-ONLY"
|
||||||
|
|
||||||
|
- name: Check /home/endami/azerothai-classic-migration/mangos-classic
|
||||||
|
run: |
|
||||||
|
echo "=== /home/endami/azerothai-classic-migration/mangos-classic ==="
|
||||||
|
ls -ld /home/endami/azerothai-classic-migration/mangos-classic
|
||||||
|
echo "test -w check:"
|
||||||
|
test -w /home/endami/azerothai-classic-migration/mangos-classic && echo "WRITABLE" || echo "READ-ONLY"
|
||||||
|
|
||||||
|
- name: Check /usr/local/bin/azerothai-ops
|
||||||
|
run: |
|
||||||
|
echo "=== /usr/local/bin/azerothai-ops ==="
|
||||||
|
ls -ld /usr/local/bin/azerothai-ops
|
||||||
|
|
||||||
|
- name: List sudo privileges
|
||||||
|
run: |
|
||||||
|
echo "=== sudo -n -l ==="
|
||||||
|
sudo -n -l || echo "sudo -n -l failed or not available"
|
||||||
Reference in New Issue
Block a user