You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by ke...@apache.org on 2021/08/25 03:10:44 UTC
[skywalking-eyes] branch docker updated (07b0128 -> a77368f)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a change to branch docker
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git.
discard 07b0128 Publish snapshot Docker image to GHCR
new a77368f Publish snapshot Docker image to GHCR
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (07b0128)
\
N -- N -- N refs/heads/docker (a77368f)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/publish-docker.yaml | 4 ++--
Makefile | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
[skywalking-eyes] 01/01: Publish snapshot Docker image to GHCR
Posted by ke...@apache.org.
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 a77368f4812aa1ecac081f3b8288699719a53635
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Wed Aug 25 11:04:51 2021 +0800
Publish snapshot Docker image to GHCR
---
.github/workflows/publish-docker.yaml | 61 +++++++++++++++++++++++++++++++++++
Makefile | 9 ++++--
README.md | 35 ++++++++++++++------
3 files changed, 94 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml
new file mode 100644
index 0000000..ead56ac
--- /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:
+ VERSION: ${{ 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/login-action@v1.10.0
+ 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/Makefile b/Makefile
index b8468b1..06ab602 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@
# under the License.
#
+HUB ?= docker.io/apache
PROJECT = license-eye
VERSION ?= latest
OUT_DIR = bin
@@ -68,7 +69,11 @@ build: windows linux darwin
.PHONY: docker
docker:
- docker build . -t $(PROJECT):$(VERSION)
+ docker build . -t $(HUB)/$(PROJECT):$(VERSION)
+
+.PHONY: docker-push
+docker-push:
+ docker push $(HUB)/$(PROJECT):$(VERSION)
.PHONY: clean
clean:
@@ -120,4 +125,4 @@ verify-docs: docs-gen
git status -s docs; \
git diff --color --word-diff --exit-code docs; \
exit 1; \
- fi
\ No newline at end of file
+ fi
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