ci: prefix PR workflow steps and use Agent runner
Some checks failed
PR - Pull Request Validation / validate-pr-title (pull_request) Has been cancelled
PR - Pull Request Validation / validate-docker (pull_request) Has been cancelled
PR - Pull Request Validation / build-test (pull_request) Has been cancelled
PR - Pull Request Validation / check-files (pull_request) Has been cancelled

- rename PR workflow and steps with 'PR -' prefix
- switch PR jobs and build job to Agent runner label
This commit is contained in:
Pat Teruel
2025-12-30 23:33:14 +08:00
parent 9363f50fdd
commit 1364300ddd
2 changed files with 13 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ env:
jobs: jobs:
build: build:
runs-on: linux runs-on: Agent
steps: steps:
- name: Build Docker image - name: Build Docker image
run: | run: |

View File

@@ -1,4 +1,4 @@
name: Pull Request Validation name: PR - Pull Request Validation
on: on:
pull_request: pull_request:
@@ -6,9 +6,9 @@ on:
jobs: jobs:
validate-pr-title: validate-pr-title:
runs-on: linux runs-on: Agent
steps: steps:
- name: Validate PR title follows Conventional Commits - name: PR - Validate PR title follows Conventional Commits
run: | run: |
PR_TITLE="${{ github.event.pull_request.title }}" PR_TITLE="${{ github.event.pull_request.title }}"
echo "Validating PR title: $PR_TITLE" echo "Validating PR title: $PR_TITLE"
@@ -47,9 +47,9 @@ jobs:
fi fi
validate-docker: validate-docker:
runs-on: linux runs-on: Agent
steps: steps:
- name: Validate Dockerfile syntax - name: PR - Validate Dockerfile syntax
run: | run: |
if [ -f "Dockerfile" ]; then if [ -f "Dockerfile" ]; then
echo "✅ Dockerfile exists" echo "✅ Dockerfile exists"
@@ -61,7 +61,7 @@ jobs:
exit 1 exit 1
fi fi
- name: Check .dockerignore exists - name: PR - Check .dockerignore exists
run: | run: |
if [ -f ".dockerignore" ]; then if [ -f ".dockerignore" ]; then
echo "✅ .dockerignore exists" echo "✅ .dockerignore exists"
@@ -69,7 +69,7 @@ jobs:
echo "⚠️ Warning: .dockerignore not found (recommended)" echo "⚠️ Warning: .dockerignore not found (recommended)"
fi fi
- name: Validate nginx config - name: PR - Validate nginx config
run: | run: |
if [ -f "nginx.conf" ]; then if [ -f "nginx.conf" ]; then
echo "✅ nginx.conf exists" echo "✅ nginx.conf exists"
@@ -81,9 +81,9 @@ jobs:
fi fi
build-test: build-test:
runs-on: linux runs-on: Agent
steps: steps:
- name: Build and test Docker image - name: PR - Build and test Docker image
run: | run: |
docker build -t karaokepedia:test . docker build -t karaokepedia:test .
CONTAINER_ID=$(docker run -d -p 8080:80 karaokepedia:test) CONTAINER_ID=$(docker run -d -p 8080:80 karaokepedia:test)
@@ -125,9 +125,9 @@ jobs:
echo "✅ All container tests passed" echo "✅ All container tests passed"
check-files: check-files:
runs-on: linux runs-on: Agent
steps: steps:
- name: Check required files exist - name: PR - Check required files exist
run: | run: |
REQUIRED_FILES=( REQUIRED_FILES=(
"karaoke.karaniwan.org/index.html" "karaoke.karaniwan.org/index.html"
@@ -158,7 +158,7 @@ jobs:
echo "" echo ""
echo "✅ All required files present" echo "✅ All required files present"
- name: Check for HTTrack artifacts in content - name: PR - Check for HTTrack artifacts in content
run: | run: |
echo "Checking that HTTrack artifacts are not included in Docker context..." echo "Checking that HTTrack artifacts are not included in Docker context..."