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/dolphinscheduler.git
The following commit(s) were added to refs/heads/docker by this push:
new 6bbb3171b5 Update publish-helm-chart.yaml
6bbb3171b5 is described below
commit 6bbb3171b5bf62223a61c1725dfb396cedd1eb8f
Author: kezhenxu94 <[email protected]>
AuthorDate: Sun Feb 26 10:50:05 2023 +0800
Update publish-helm-chart.yaml
---
.github/workflows/publish-helm-chart.yaml | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/publish-helm-chart.yaml
b/.github/workflows/publish-helm-chart.yaml
index 92bdda867b..d94ce5619b 100644
--- a/.github/workflows/publish-helm-chart.yaml
+++ b/.github/workflows/publish-helm-chart.yaml
@@ -34,12 +34,25 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
+ - name: Set environment variables
+ run: |
+ if [[ ${{ github.event_name }} != "release" ]]; then
+ echo "HUB=apache" >> $GITHUB_ENV
+ echo "DOCKER_REGISTRY=docker.io" >> $GITHUB_ENV
+ echo "DOCKER_USERNAME=${{ secrets.DOCKERHUB_USER }}" >> $GITHUB_ENV
+ echo "DOCKER_PASSWORD=${{ secrets.DOCKERHUB_TOKEN }}" >>
$GITHUB_ENV
+ else
+ echo "HUB=ghcr.io/apache/dolphinscheduler" >> $GITHUB_ENV
+ echo "DOCKER_REGISTRY=ghcr.io/apache/dolphinscheduler" >>
$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/[email protected]
+ 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: Publish Helm Chart
working-directory: deploy/kubernetes
run: |