Update main.yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-n-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
run: sudo service docker start | |
- name: Build DVWP Docker Compose | |
run: | | |
docker-compose up -d --build | |
echo "Waiting for MySQL to be ready..." | |
until docker-compose exec -T mysql mysql -u root -ppassword -e 'SELECT 1'; do | |
echo "Still waiting for MySQL..." | |
sleep 5 | |
done | |
echo "MySQL is ready." | |
docker-compose run --rm wp-cli install-wp | |
- name: Run WPScan | |
run: | | |
docker pull wpscanteam/wpscan | |
docker run --network dvwp_default wpscanteam/wpscan wpscan --url http://wordpress/ --force | |
- name: Cleanup Docker Compose Services | |
run: docker-compose down | |