فهرست منبع

update Dockerfile and github-actions main workflow

Yuki Takei 6 سال پیش
والد
کامیت
8b907a8d15
3فایلهای تغییر یافته به همراه8 افزوده شده و 13 حذف شده
  1. 7 4
      .github/workflows/main.yml
  2. 0 1
      bin/github-actions/bump-version.sh
  3. 1 8
      docker/Dockerfile

+ 7 - 4
.github/workflows/main.yml

@@ -1,6 +1,9 @@
 name: CI
 
-on: [push]
+on:
+  push:
+    branches:
+      - support/github-actions
 
 jobs:
   build:
@@ -9,10 +12,10 @@ jobs:
 
     steps:
     - uses: actions/checkout@v1
-      
+
     - name: Bump version
       run: sh ./bin/github-actions/bump-version.sh
-      
+
     - name: Set up Docker Buildx
       uses: crazy-max/ghaction-docker-buildx@v1.0.4
       with:
@@ -24,4 +27,4 @@ jobs:
         docker buildx build \
           --platform linux/amd64 \
           --output "type=image,push=false" \
-          --file ./docker/Dockerfile ./docker
+          --file ./docker/Dockerfile .

+ 0 - 1
bin/github-actions/bump-version.sh

@@ -2,6 +2,5 @@
 
 cd docker
 
-sed -i -e "s/^\(ENV APP_VERSION v\).\+$/\1${RELEASE_VERSION}/" Dockerfile
 sed -i -e "s/^\([*] \[\`\)[^\`]\+\(\`, \`3\.5\`, .\+\]\)\(.\+\/blob\/v\).\+\(\/Dockerfile.\+\)$/\1${RELEASE_VERSION}\2\3${RELEASE_VERSION}\4/" README.md
 sed -i -e "s/^\([*] \[\`\)[^\`]\+\(\`, \`3\.5-nocdn\`, .\+\]\)\(.\+\/blob\/v\).\+\(\/nocdn\/Dockerfile.\+\)$/\1${RELEASE_VERSION}-nocdn\2\3${RELEASE_VERSION}\4/" README.md

+ 1 - 8
docker/Dockerfile

@@ -10,15 +10,8 @@ ARG flavor=default
 FROM node:12-slim AS setupper-default
 LABEL maintainer Yuki Takei <yuki@weseek.co.jp>
 
-ENV appVersion v3.5.13
-ARG archiveName=${appVersion}
-ENV appDir /opt/growi
-
 RUN mkdir -p ${appDir}
-
-# download GROWI archive from Github
-RUN curl -SL https://github.com/weseek/growi/archive/${archiveName}.tar.gz \
-    | tar -xz -C ${appDir} --strip-components 1
+RUN mv .* ${appDir}/
 
 WORKDIR ${appDir}