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

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git


The following commit(s) were added to refs/heads/main by this push:
     new c236d9c  Publish the docker image to the GitHub Package (#9)
c236d9c is described below

commit c236d9c8eff23b6c5d89c29e3bec7ae2cbcf2b60
Author: mrproliu <[email protected]>
AuthorDate: Sun Mar 27 16:53:54 2022 +0800

    Publish the docker image to the GitHub Package (#9)
---
 .../workflows/publish-docker.yaml                  | 56 ++++++++++++----------
 .github/workflows/rover.yaml                       |  2 +-
 docker/Dockerfile.build                            |  2 +-
 scripts/build/docker.mk                            |  4 +-
 test/e2e/base/base-compose.yml                     |  2 +-
 5 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/docker/Dockerfile.build b/.github/workflows/publish-docker.yaml
similarity index 52%
copy from docker/Dockerfile.build
copy to .github/workflows/publish-docker.yaml
index f06ed33..d9feb66 100644
--- a/docker/Dockerfile.build
+++ b/.github/workflows/publish-docker.yaml
@@ -14,27 +14,35 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=apache/skywalking-rover:vlatest
-FROM $BASE_IMAGE as build
-
-ARG VERSION="latest"
-
-WORKDIR /src
-
-COPY . .
-
-ENV CGO_ENABLED=0
-
-RUN VERSION=$VERSION make generate && make linux
-RUN mv /src/bin/skywalking-rover-${VERSION}-linux-amd64 
/src/bin/skywalking-rover
-
-FROM scratch
-
-VOLUME /skywalking/configs
-
-WORKDIR /skywalking
-
-COPY --from=build /src/bin/skywalking-rover /
-COPY --from=build /src/configs /skywalking/configs
-
-CMD ["/skywalking-rover", "start", "--config", 
"/skywalking/configs/rover_configs.yaml"]
\ No newline at end of file
+name: publish-docker
+
+on:
+  push:
+    branches:
+      - main
+
+env:
+  HUB: ghcr.io/apache/skywalking-rover
+
+jobs:
+  build:
+    if: github.repository == 'apache/skywalking-rover'
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      packages: write
+    timeout-minutes: 90
+    env:
+      VERSION: ${{ github.sha }}
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - 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 images
+        run: make docker docker.push
\ No newline at end of file
diff --git a/.github/workflows/rover.yaml b/.github/workflows/rover.yaml
index d6edc2a..4b68061 100644
--- a/.github/workflows/rover.yaml
+++ b/.github/workflows/rover.yaml
@@ -57,7 +57,7 @@ jobs:
       - name: Build and save docker images
         run: |
           make docker
-          docker save -o docker-images-skywalking-rover.tar 
apache/skywalking-rover:vlatest
+          docker save -o docker-images-skywalking-rover.tar 
apache/skywalking-rover:latest
       - name: Upload docker images
         uses: actions/upload-artifact@v2
         with:
diff --git a/docker/Dockerfile.build b/docker/Dockerfile.build
index f06ed33..30991d8 100644
--- a/docker/Dockerfile.build
+++ b/docker/Dockerfile.build
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE=apache/skywalking-rover:vlatest
+ARG BASE_IMAGE=apache/skywalking-rover:latest
 FROM $BASE_IMAGE as build
 
 ARG VERSION="latest"
diff --git a/scripts/build/docker.mk b/scripts/build/docker.mk
index 75faa14..ace697a 100644
--- a/scripts/build/docker.mk
+++ b/scripts/build/docker.mk
@@ -21,8 +21,8 @@ HUB ?= apache
 .PHONY: docker
 docker: build-base-container
        docker build --build-arg VERSION=$(VERSION) --build-arg 
BASE_IMAGE=${CONTAINER_COMMAND_IMAGE}:${CONTAINER_COMMAND_TAG} \
-               -t $(HUB)/skywalking-rover:v$(VERSION) --no-cache . -f 
docker/Dockerfile.build
+               -t $(HUB)/skywalking-rover:$(VERSION) --no-cache . -f 
docker/Dockerfile.build
 
 .PHONY: docker.push
 docker.push:
-       docker push $(HUB)/skywalking-rover:v$(VERSION)
\ No newline at end of file
+       docker push $(HUB)/skywalking-rover:$(VERSION)
\ No newline at end of file
diff --git a/test/e2e/base/base-compose.yml b/test/e2e/base/base-compose.yml
index 9d11bab..168ca1f 100644
--- a/test/e2e/base/base-compose.yml
+++ b/test/e2e/base/base-compose.yml
@@ -31,7 +31,7 @@ services:
       retries: 120
 
   rover:
-    image: apache/skywalking-rover:vlatest
+    image: apache/skywalking-rover:latest
     networks:
       - e2e
     privileged: true

Reply via email to