From 23dd6e86688dc6cd6a9197a7b087390d705e264d Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Wed, 25 Mar 2020 18:59:44 +0900 Subject: [PATCH] ci: split dev-image.yml --- .github/workflows/dev-image.yml | 34 +++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 8 -------- Makefile | 2 +- 3 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/dev-image.yml diff --git a/.github/workflows/dev-image.yml b/.github/workflows/dev-image.yml new file mode 100644 index 000000000..36dbfdd38 --- /dev/null +++ b/.github/workflows/dev-image.yml @@ -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 ciall diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff66d0b21..7d7f240a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/Makefile b/Makefile index 85323e661..90f1fd6bf 100644 --- a/Makefile +++ b/Makefile @@ -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