From bcf06f958b9fb4dba5e1dfb16ee2072ae57130d3 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Tue, 20 Aug 2019 00:49:18 +0900 Subject: [PATCH] enhance: GitHub Actions --- .github/workflows/push.yml | 10 ++++++---- README.md | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c8125d8..26d7d13 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,12 +7,14 @@ on: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@master - name: Docker build and print Hugo version if: github.event.deleted == false + env: + DOCKER_IMAGE: ${{ github.repository }}:${{ github.sha }} run: | - docker build -t peaceiris/actions-hugo . && - docker run peaceiris/actions-hugo:latest version || - (echo -e "\e[31mfailed to build\e[m" && exit 1) + docker build . --file Dockerfile --tag ${DOCKER_IMAGE} && + docker run ${DOCKER_IMAGE} version || + (echo -e "\e[31m[${GITHUB_WORKFLOW}] failed to build\e[m" && exit 1) diff --git a/README.md b/README.md index c5ea240..95a3c99 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE) [![release](https://img.shields.io/github/release/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases/latest) [![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases) +[![GitHub Actions status](https://github.com/peaceiris/actions-hugo/workflows/Push%20workflow/badge.svg)](https://github.com/peaceiris/actions-hugo/actions) GitHub Actions for Hugo extended