mirror of
https://github.com/status-im/actions-gh-pages.git
synced 2025-02-23 18:28:15 +00:00
ci: push dev docker image to packages (#384)
This commit is contained in:
parent
2e976845a6
commit
29acb8eaee
6
.github/workflows/dev-image.yml
vendored
6
.github/workflows/dev-image.yml
vendored
@ -32,6 +32,12 @@ jobs:
|
||||
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Login to Packages
|
||||
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login 'docker.pkg.github.com' -u 'peaceiris' --password-stdin
|
||||
- run: make pull
|
||||
if: github.event_name == 'pull_request'
|
||||
- run: make build
|
||||
- run: make cirun cmd="npm ci"
|
||||
- run: make ciall
|
||||
- run: make push
|
||||
if: github.ref == 'refs/heads/master'
|
||||
|
16
Makefile
16
Makefile
@ -1,15 +1,25 @@
|
||||
cmd := "bash"
|
||||
msg := ""
|
||||
IMAGE_NAME := actions_github_pages_dev:latest
|
||||
IMAGE_NAME := docker.pkg.github.com/peaceiris/actions-gh-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 $(IMAGE_NAME)
|
||||
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
$(DOCKER_BUILD)
|
||||
docker build . \
|
||||
--build-arg NODE_VERSION=$(NODE_VERSION) \
|
||||
--cache-from=${IMAGE_NAME} \
|
||||
-t $(IMAGE_NAME)
|
||||
|
||||
.PHONY: pull
|
||||
pull:
|
||||
docker pull ${IMAGE_NAME}
|
||||
|
||||
.PHONY: push
|
||||
push:
|
||||
docker push ${IMAGE_NAME}
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
|
Loading…
x
Reference in New Issue
Block a user