File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 32
32
if : contains(github.event.head_commit.message, '[skip ci]') == false
33
33
steps :
34
34
35
+ - name : Login to Packages
36
+ run : echo '${{ secrets.GITHUB_TOKEN }}' | docker login 'docker.pkg.github.com' -u 'peaceiris' --password-stdin
37
+ - run : make pull
38
+ if : github.event_name == 'pull_request'
35
39
- run : make build
36
40
- run : make cirun cmd="npm ci"
37
41
- run : make ciall
42
+ - run : make push
43
+ if : github.ref == 'refs/heads/master'
Original file line number Diff line number Diff line change 1
1
cmd := "bash"
2
2
msg := ""
3
- IMAGE_NAME := actions_github_pages_dev :latest
3
+ IMAGE_NAME := docker.pkg.github.com/peaceiris/actions-gh-pages/dev :latest
4
4
NODE_VERSION := $(shell cat ./.nvmrc)
5
- DOCKER_BUILD := docker build . -t $(IMAGE_NAME ) --build-arg NODE_VERSION=$(NODE_VERSION )
6
5
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME )
7
6
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME )
8
7
9
8
10
9
.PHONY : build
11
10
build :
12
- $(DOCKER_BUILD )
11
+ docker build . \
12
+ --build-arg NODE_VERSION=$(NODE_VERSION ) \
13
+ --cache-from=${IMAGE_NAME} \
14
+ -t $(IMAGE_NAME )
15
+
16
+ .PHONY : pull
17
+ pull :
18
+ docker pull ${IMAGE_NAME}
19
+
20
+ .PHONY : push
21
+ push :
22
+ docker push ${IMAGE_NAME}
13
23
14
24
.PHONY : run
15
25
run :
You can’t perform that action at this time.
0 commit comments