mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-24 02:37:29 +01:00
ci: Add workflow for developing container (#231)
* ci: Add workflow for developing container * ci: Add CI tasks to Makefile * chore: Add RUNNER_TEMP to Dockerfile * deps: Bump git from 2.25.0 to 2.26.0
This commit is contained in:
15
Makefile
15
Makefile
@@ -4,6 +4,7 @@ IMAGE_NAME := actions_hugo_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 $(IMAGE_NAME)
|
||||
|
||||
|
||||
.PHONY: build
|
||||
@@ -14,10 +15,18 @@ build:
|
||||
run:
|
||||
$(DOCKER_RUN) $(cmd)
|
||||
|
||||
.PHONY: cirun
|
||||
cirun:
|
||||
$(DOCKER_RUN_CI) $(cmd)
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
$(DOCKER_RUN) npm test
|
||||
|
||||
.PHONY: commit
|
||||
commit:
|
||||
$(DOCKER_RUN) git commit -m "$(msg)"
|
||||
.PHONY: all
|
||||
all:
|
||||
$(DOCKER_RUN) npm run all
|
||||
|
||||
.PHONY: ciall
|
||||
ciall:
|
||||
$(DOCKER_RUN_CI) npm run all
|
||||
|
||||
Reference in New Issue
Block a user