enhance: GitHub Actions

This commit is contained in:
peaceiris 2019-08-20 00:49:18 +09:00
parent 79fb16c8e4
commit bcf06f958b
2 changed files with 7 additions and 4 deletions

View file

@ -7,12 +7,14 @@ on:
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- name: Docker build and print Hugo version - name: Docker build and print Hugo version
if: github.event.deleted == false if: github.event.deleted == false
env:
DOCKER_IMAGE: ${{ github.repository }}:${{ github.sha }}
run: | run: |
docker build -t peaceiris/actions-hugo . && docker build . --file Dockerfile --tag ${DOCKER_IMAGE} &&
docker run peaceiris/actions-hugo:latest version || docker run ${DOCKER_IMAGE} version ||
(echo -e "\e[31mfailed to build\e[m" && exit 1) (echo -e "\e[31m[${GITHUB_WORKFLOW}] failed to build\e[m" && exit 1)

View file

@ -1,6 +1,7 @@
[![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE) [![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) [![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 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)
<img width="400" alt="GitHub Actions for Hugo extended" src="./images/ogp.svg"> <img width="400" alt="GitHub Actions for Hugo extended" src="./images/ogp.svg">