✨ [GEST-2855] Configurando SSL no apache #3
Workflow file for this run
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: Docker | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Up environment | |
run: | | |
docker compose up --build -d | |
- name: Wait environment | |
run: | | |
docker run -t --network apache jwilder/dockerize \ | |
-wait http://apache_apache/ \ | |
-timeout 120s | |
- name: Logs environment | |
run: | | |
docker compose ps | |
docker compose logs apache | |
- name: Run tests | |
run: | | |
CONTENT=$(curl -s "http://127.0.0.1/"); | |
CONTENT_PHP=$(curl -s "http://127.0.0.1/script.php"); | |
CONTENT_REWRITE=$(curl -s "https://127.0.0.1/rewrite/apache.php"); | |
echo "CHAMADA HTTP NORMAL: ${CONTENT}"; | |
echo "CHAMADA HTTP PHP: ${CONTENT_PHP}"; | |
echo "CHAMADA HTTP REWRITE: ${CONTENT_REWRITE}"; | |
if [ "${CONTENT}" != "html" ]; then | |
echo "Chamada HTTP NORMAL retornou errado: ${CONTENT}" | |
exit 1; | |
fi | |
if [ "${CONTENT_PHP}" != "php" ]; then | |
echo "Chamada HTTP TRYFILES retornou errado: ${CONTENT_PHP}" | |
exit 1; | |
fi | |
if [ "${CONTENT_REWRITE}" != "/rewrite/apache.php" ]; then | |
echo "Chamada HTTP REWRITE retornou errado: ${CONTENT_REWRITE}" | |
exit 1; | |
fi | |
push: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build and push Docker images | |
uses: docker/build-push-action@v1.1.0 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: likesistemas/apache | |
tag_with_ref: true | |
tag_with_sha: true |