Skip to content

Merge pull request #2 from hexrom/feature/github-action #1

Merge pull request #2 from hexrom/feature/github-action

Merge pull request #2 from hexrom/feature/github-action #1

Workflow file for this run

name: CI Workflow
on:
push:
branches:
- master
jobs:
all-in-one:
runs-on: ubuntu-latest
services:
docker:
image: docker:dind
options: --tls=false
env:
DOCKER_TLS_CERTDIR: ""
ports:
- 2375:2375
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Docker environment
run: |
echo "DOCKER_DRIVER=overlay2" >> $GITHUB_ENV
echo "DOCKER_HOST=tcp://localhost:2375/" >> $GITHUB_ENV
- name: Run Docker Compose and WPScan
run: |
docker-compose up -d --build
until docker-compose exec mysql mysql -u root -ppassword -e 'SELECT 1'; do
echo "Waiting for MySQL to be ready..."
sleep 5
done
docker-compose run --rm wp-cli install-wp
sleep 10
docker pull wpscanteam/wpscan
sleep 5
docker run --network dvwp_default wpscanteam/wpscan wpscan --url http://wordpress/
docker-compose down