mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 06:33:17 +08:00
* fix: Fixes for docker hub image (INPUT_EMPTYCOMMITS false condition) * fix: Add skip function Close #27 Close #31 Keep open #29 * gha: Add fetch-depth 1 to actions/checkout * gha: Add pull_request trigger, Close #32
49 lines
961 B
YAML
49 lines
961 B
YAML
name: docker image ci
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
push:
|
|
paths:
|
|
- '**'
|
|
- '.**'
|
|
- '!LICENSE'
|
|
- '!README.md'
|
|
- '!images'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: build
|
|
env:
|
|
DOCKER_IMAGE: docker.pkg.github.com/${{ github.repository }}/action:latest
|
|
run: |
|
|
docker build . --file Dockerfile --tag ${DOCKER_IMAGE} ||
|
|
(echo -e "\e[31m[${GITHUB_WORKFLOW}] failed to build\e[m" && exit 1)
|
|
|
|
shellcheck:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
fetch-depth: 1
|
|
- name: shellcheck
|
|
run: shellcheck ./entrypoint.sh
|
|
|
|
hadolint:
|
|
runs-on: macOS-10.14
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
fetch-depth: 1
|
|
- name: hadolint
|
|
run: |
|
|
brew install hadolint
|
|
hadolint ./Dockerfile
|