Use original entrypoint #25
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@v2 | |
- name: Run tests | |
run: | | |
echo "PHP_FPM_PASSWORD=123456" > .env | |
docker-compose up --build -d | |
sleep 2 | |
docker ps -a | |
docker logs nginx_nginx | |
CONTENT=$(curl -s "http://127.0.0.1:83/"); | |
CONTENT_REWRITE=$(curl -s "http://127.0.0.1:81/"); | |
CONTENT_TRYFILES=$(curl -s "http://127.0.0.1:82/"); | |
echo "CHAMADA HTTP NORMAL: ${CONTENT}"; | |
echo "CHAMADA HTTP REWRITE: ${CONTENT_REWRITE}"; | |
echo "CHAMADA HTTP TRYFILES: ${CONTENT_TRYFILES}"; | |
if [ "${CONTENT}" != "php" ]; then | |
echo "Chamada HTTP NORMAL retornou errado: ${CONTENT}" | |
exit 1; | |
fi | |
if [ "${CONTENT_REWRITE}" != "rewrite" ]; then | |
echo "Chamada HTTP REWRITE retornou errado: ${CONTENT_REWRITE}" | |
exit 1; | |
fi | |
if [ "${CONTENT_TRYFILES}" != "tryfiles" ]; then | |
echo "Chamada HTTP TRYFILES retornou errado: ${CONTENT_TRYFILES}" | |
exit 1; | |
fi | |
push: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: Dockerfile | |
build-args: | | |
PHP_FPM_PASSWORD=${{ secrets.FPM_PASSWORD }} | |
push: true | |
tags: | | |
likesistemas/nginx:latest | |
ghcr.io/likesistemas/nginx:latest | |
- name: Build and push with filebeat | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: Dockerfile.filebeat | |
push: true | |
tags: | | |
likesistemas/nginx:filebeat | |
ghcr.io/likesistemas/nginx:filebeat |