Update .gitlab-ci.yml #6
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: Run Docker Compose and WPScan | |
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 | |
sleep 10 | |
docker pull wpscanteam/wpscan | |
sleep 5 | |
docker run --network dvwp_default wpscanteam/wpscan wpscan --url http://wordpress/ --force | |
docker-compose down |