mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-15 06:33:17 +08:00
Changes for peaceiris/actions-gh-pages * update: yaml example of GitHub Actions v2 settings for MkDocs, close #8 * revert: support ACTIONS_DEPLOY_KEY (ssh deploy) again * upgrade: Hugo to v0.58.0 at example yaml * remove: steps if statement from example yaml, close #12 Changes for this repository * gha: add lint job (shellcheck and hadolint) * gha: remove tag filter * gha: remove steps if statement, close #12 * gha: add action.yml * fix: FUNDING.yml
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: docker image ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- 'release-v*'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- 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)
|
|
|
|
# - name: push latest image
|
|
# if: endsWith(github.ref, 'master')
|
|
# env:
|
|
# DOCKER_IMAGE: docker.pkg.github.com/${{ github.repository }}/action:latest
|
|
# PKG_GITHUB_TOKEN: ${{ secrets.PKG_GITHUB_TOKEN }}
|
|
# run: |
|
|
# echo ${PKG_GITHUB_TOKEN} | docker login docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin &&
|
|
# docker push ${DOCKER_IMAGE} &&
|
|
# docker logout
|
|
|
|
shellcheck:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: shellcheck
|
|
run: shellcheck ./entrypoint.sh
|
|
|
|
hadolint:
|
|
runs-on: macOS-10.14
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: hadolint
|
|
run: |
|
|
brew install hadolint
|
|
hadolint ./Dockerfile
|