This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch docker
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git

commit cae3ea6ee6432d924034bb64c693d6389d5b433f
Author: kezhenxu94 <[email protected]>
AuthorDate: Wed Aug 25 11:04:51 2021 +0800

    Publish snapshot Docker image to GHCR
---
 .github/workflows/publish-docker.yaml | 61 +++++++++++++++++++++++++++++++++++
 README.md                             | 35 ++++++++++++++------
 2 files changed, 87 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/publish-docker.yaml 
b/.github/workflows/publish-docker.yaml
new file mode 100644
index 0000000..4f3c3db
--- /dev/null
+++ b/.github/workflows/publish-docker.yaml
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: publish-docker
+
+on:
+  push:
+    branches:
+      - main
+      - docker
+
+env:
+  HUB: ghcr.io/apache/skywalking-eyes
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking-eyes'
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+    timeout-minutes: 30
+    strategy:
+      matrix:
+        tag:
+          - ${{ github.sha }}
+          - main
+    env:
+      TAG: ${{ matrix.tag }}
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - uses: actions/cache@v2
+        with:
+          path: |
+            ~/.cache/go-build
+            ~/go/pkg/mod
+          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+          restore-keys: ${{ runner.os }}-go-
+      - name: Log in to the Container registry
+        uses: docker/[email protected]
+        with:
+          registry: ${{ env.HUB }}
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+      - name: Build and push docker image
+        run: make docker && make docker.push
diff --git a/README.md b/README.md
index effb082..ce6495f 100644
--- a/README.md
+++ b/README.md
@@ -49,22 +49,39 @@ header:
 ### Docker Image
 
 ```shell
-$ docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes 
header check
-$ docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes 
header fix
+docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header 
check
+docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header 
fix
+```
+
+### Docker Image from latest codes
+
+For users and developers who want to help to test the latest codes on main 
branch, we publish Docker image to GitHub
+Container Registry for every commit in main branch, tagged with the commit 
sha, if it's the latest commit in main
+branch, it's also tagged with `main`.
+
+**Note**: these Docker images are not official Apache releases. For official 
releases, please refer to
+[the download page](https://skywalking.apache.org/downloads/#SkyWalkingEyes) 
for executable binary and
+[the Docker hub](https://hub.docker.com/r/apache/skywalking-eyes) for Docker 
images.
+
+TODO
+
+```shell
+docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header 
check
+docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header 
fix
 ```
 
 ### Compile from Source
 
 ```bash
-$ git clone https://github.com/apache/skywalking-eyes
-$ cd skywalking-eyes
-$ make build
+git clone https://github.com/apache/skywalking-eyes
+cd skywalking-eyes
+make build
 ```
 
 #### Check License Header
 
 ```bash
-$ bin/darwin/license-eye -c test/testdata/.licenserc_for_test_check.yaml 
header check
+bin/darwin/license-eye -c test/testdata/.licenserc_for_test_check.yaml header 
check
 
 INFO Loading configuration from file: 
test/testdata/.licenserc_for_test_check.yaml 
 INFO Totally checked 30 files, valid: 12, invalid: 12, ignored: 6, fixed: 0 
@@ -87,7 +104,7 @@ exit status 1
 #### Fix License Header
 
 ```bash
-$ bin/darwin/license-eye -c test/testdata/.licenserc_for_test_fix.yaml header 
fix
+bin/darwin/license-eye -c test/testdata/.licenserc_for_test_fix.yaml header fix
 
 INFO Loading configuration from file: 
test/testdata/.licenserc_for_test_fix.yaml
 INFO Totally checked 20 files, valid: 10, invalid: 10, ignored: 0, fixed: 10 
@@ -98,7 +115,7 @@ INFO Totally checked 20 files, valid: 10, invalid: 10, 
ignored: 0, fixed: 10
 This command serves as assistance for human beings to audit the dependencies 
license, it's exit code is always 0.
 
 ```bash
-$ bin/darwin/license-eye -c test/testdata/.licenserc_for_test_check.yaml dep 
resolve
+bin/darwin/license-eye -c test/testdata/.licenserc_for_test_check.yaml dep 
resolve
 INFO GITHUB_TOKEN is not set, license-eye won't comment on the pull request
 INFO Loading configuration from file: 
test/testdata/.licenserc_for_test_check.yaml
 WARNING Failed to resolve the license of dependency: gopkg.in/yaml.v3 cannot 
identify license content
@@ -143,7 +160,7 @@ This command can be used to perform automatic license 
compatibility check, when
 the command will exit with status code 1 and fail the command.
 
 ```bash
-$ bin/darwin/license-eye -c test/testdata/.licenserc_for_test_check.yaml dep 
check
+bin/darwin/license-eye -c test/testdata/.licenserc_for_test_check.yaml dep 
check
 INFO GITHUB_TOKEN is not set, license-eye won't comment on the pull request 
 INFO Loading configuration from file: .licenserc.yaml 
 WARNING Failed to resolve the license of <github.com/gogo/protobuf>: cannot 
identify license content 

Reply via email to