enhance: GitHub Actions
This commit is contained in:
parent
79fb16c8e4
commit
bcf06f958b
2 changed files with 7 additions and 4 deletions
10
.github/workflows/push.yml
vendored
10
.github/workflows/push.yml
vendored
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
[](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
[](https://github.com/peaceiris/actions-hugo/releases/latest)
|
||||||
[](https://github.com/peaceiris/actions-hugo/releases)
|
[](https://github.com/peaceiris/actions-hugo/releases)
|
||||||
|
[](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">
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue