You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2023/02/26 02:34:15 UTC
[skywalking] 01/01: Publish Docker images on release
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.git
commit c057194edcb05a81223154a704d56bdf1bbc8c10
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Sun Feb 26 10:34:00 2023 +0800
Publish Docker images on release
---
.github/workflows/publish-docker.yaml | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml
index e4feca9b31..ab79ff925a 100644
--- a/.github/workflows/publish-docker.yaml
+++ b/.github/workflows/publish-docker.yaml
@@ -20,10 +20,10 @@ on:
push:
branches:
- master
+ - docker
env:
SKIP_TEST: true
- HUB: ghcr.io/apache/skywalking
jobs:
build:
@@ -46,12 +46,24 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
+ - name: Set environment variables
+ run: |
+ if [[ ${{ github.event_name }} != "release" ]]; then
+ echo "HUB=apache" >> $GITHUB_ENV
+ echo "DOCKER_USERNAME=${{ secrets.DOCKERHUB_USER }}" >> $GITHUB_ENV
+ echo "DOCKER_PASSWORD=${{ secrets.DOCKERHUB_TOKEN }}" >> $GITHUB_ENV
+ else
+ echo "HUB=ghcr.io/apache/skywalking" >> $GITHUB_ENV
+ echo "DOCKER_REGISTRY=ghcr.io/apache/skywalking" >> $GITHUB_ENV
+ echo "DOCKER_USERNAME=${{ github.actor }}" >> $GITHUB_ENV
+ echo "DOCKER_PASSWORD=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
+ fi
- name: Log in to the Container registry
- uses: docker/login-action@v1.10.0
+ uses: docker/login-action@v2
with:
- registry: ${{ env.HUB }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
+ registry: ${{ env.DOCKER_REGISTRY }}
+ username: ${{ env.DOCKER_USERNAME }}
+ password: ${{ env.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx