Skip to content

Commit

Permalink
ci: split dev-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Mar 25, 2020
1 parent 6ce14f3 commit 03955c2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/dev-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Dev Image CI'

on:
push:
branches:
- master
paths:
- '.dockerignore'
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'
pull_request:
types:
- opened
- synchronize
paths:
- '.dockerignore'
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'

jobs:
skipci:
runs-on: ubuntu-18.04
steps:
- run: echo "[skip ci] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"

dev-image-test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: make build
- run: make cirun cmd="npm ci"
- run: make citest
8 changes: 0 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ jobs:
steps:
- run: echo "[Skip CI] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"

dev-image:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: make build
- run: make cirun cmd="npm ci"
- run: make ciall

test:
runs-on: ${{ matrix.os }}
if: contains(github.event.head_commit.message, '[skip ci]') == false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ IMAGE_NAME := actions_github_pages_dev:latest
NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)


.PHONY: build
Expand Down

0 comments on commit 03955c2

Please sign in to comment.