diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ff8e8e..31df4ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,9 +68,6 @@ jobs: with: fetch-depth: 1 - - name: Generate version value - run: echo "::set-env name=APP_VERSION::${GITHUB_REF##*/}@`echo ${GITHUB_SHA} | cut -c1-8`" - - name: Generate image tag value run: echo "::set-env name=IMAGE_TAG::${GITHUB_REF##*/[vV]}" # `/refs/tags/v1.2.3` -> `1.2.3` @@ -78,10 +75,10 @@ jobs: run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_LOGIN }}" --password-stdin &> /dev/null - name: Build image - run: docker build --build-arg "APP_VERSION=${APP_VERSION}" --tag "tarampampam/tinifier:${IMAGE_TAG}" --tag "tarampampam/tinifier:latest" -f ./Dockerfile . + run: docker build --tag "tarampampam/error-pages:${IMAGE_TAG}" --tag "tarampampam/error-pages:latest" -f ./Dockerfile . - name: Push version image - run: docker push "tarampampam/tinifier:${IMAGE_TAG}" + run: docker push "tarampampam/error-pages:${IMAGE_TAG}" - name: Push latest image - run: docker push "tarampampam/tinifier:latest" + run: docker push "tarampampam/error-pages:latest" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6616f10..9bcef7b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,11 +36,17 @@ jobs: # Docs: run: test -f ./out/ghost/404.html docker-build: - name: Try to run generator + name: Build docker image runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 - name: Build docker image - run: docker build -f ./Dockerfile . + run: docker build -f ./Dockerfile --tag image:local . + + - name: Run docker image + run: docker run --rm -d -p "8080:8080" -e "TEMPLATE_NAME=ghost") image:local + + - name: Send HTTP request + run: curl -sS --fail "http://127.0.0.1:8080/500.html" diff --git a/README.md b/README.md index da9864f..8f758ef 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ Default configuration can be found in [`configuration.json`](./configuration.jso ### Docker +[![Image size][badge_size_latest]][link_docker_build] + Start image (`nginx` inside): ```bash @@ -83,6 +85,7 @@ This is open-sourced software licensed under the [MIT License][link_license]. [badge_issues]:https://img.shields.io/github/issues/tarampampam/error-pages-docker.svg?style=flat-square&maxAge=180 [badge_pulls]:https://img.shields.io/github/issues-pr/tarampampam/error-pages-docker.svg?style=flat-square&maxAge=180 [badge_license]:https://img.shields.io/github/license/tarampampam/error-pages-docker.svg?longCache=true +[badge_size_latest]:https://img.shields.io/docker/image-size/tarampampam/error-pages/latest?maxAge=30 [link_releases]:https://github.com/tarampampam/error-pages-docker/releases [link_commits]:https://github.com/tarampampam/error-pages-docker/commits [link_changes_log]:https://github.com/tarampampam/error-pages-docker/blob/master/CHANGELOG.md @@ -91,3 +94,4 @@ This is open-sourced software licensed under the [MIT License][link_license]. [link_build_status]:https://travis-ci.org/tarampampam/error-pages-docker [link_create_issue]:https://github.com/tarampampam/error-pages-docker/issues/new [link_license]:https://github.com/tarampampam/error-pages-docker/blob/master/LICENSE +[link_docker_build]:https://hub.docker.com/r/tarampampam/error-pages/