Browse Source

WIP: write build.yml

Yuki Takei 6 years ago
parent
commit
72b3430b91
1 changed files with 42 additions and 5 deletions
  1. 42 5
      .github/workflows/build.yml

+ 42 - 5
.github/workflows/build.yml

@@ -2,10 +2,13 @@ name: Release Docker Images
 
 
 on:
 on:
   push:
   push:
+  branches:
+      - rc/*
     tags:
     tags:
       - v3.*
       - v3.*
 
 
 jobs:
 jobs:
+
   build:
   build:
 
 
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
@@ -13,18 +16,52 @@ jobs:
     steps:
     steps:
     - uses: actions/checkout@v1
     - 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
+
+    - name: Build Docker Image
+      run: |
+        docker buildx build \
+          --tag growi
+          --platform linux/amd64 \
+          --output "type=image,push=false" \
+          --file ./docker/Dockerfile .
+
+    - name: Login to docker.io registry
+      run: |
+        docker login --username wsmoogle --password ${{ secrets. DOCKER_REGISTRY_PASSWORD }}
+
+    - name: Publish
+      run: |
+        docker tag growi weseek/growi:latest
+        docker publish weseek/growi:latest
+
+  build-nocdn:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v1
 
 
     - name: Set up Docker Buildx
     - name: Set up Docker Buildx
       uses: crazy-max/ghaction-docker-buildx@v1.0.4
       uses: crazy-max/ghaction-docker-buildx@v1.0.4
-      with:
-        # Buildx version. Example: v0.3.0
-        version: # optional, default is latest
 
 
     - name: Build Docker Image
     - name: Build Docker Image
       run: |
       run: |
         docker buildx build \
         docker buildx build \
+          --tag growi-nocdn
+          --build-arg flavor=nocdn
           --platform linux/amd64 \
           --platform linux/amd64 \
           --output "type=image,push=false" \
           --output "type=image,push=false" \
           --file ./docker/Dockerfile .
           --file ./docker/Dockerfile .
+
+  publish-desc:
+
+    runs-on: ubuntu-latest
+    needs: build
+
+    steps:
+    - uses: actions/checkout@v1
+
+    - name: Bump version
+      run: sh ./bin/github-actions/bump-version.sh