Skip to content

Commit c089fb0

Browse files
authored
Merge 281e380 into 9e7b3de
2 parents 9e7b3de + 281e380 commit c089fb0

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/dockerhub-publish-nightly.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,34 @@ on:
55
schedule:
66
- cron: '10 20 * * *'
77

8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
812
jobs:
913
docker:
1014
if: github.repository_owner == 'CeresDB'
1115
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
1219
steps:
1320
- name: Checkout
1421
uses: actions/checkout@v3
1522
- name: Set up Docker Buildx
1623
uses: docker/setup-buildx-action@v2
17-
- name: Login to DockerHub
24+
- name: Login to Container Registry
1825
uses: docker/login-action@v2
1926
with:
20-
username: ${{ secrets.DOCKERHUB_USERNAME }}
21-
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
2230
- name: Set Environment Variables
2331
run: |
2432
echo "BUILD_DATE=$(TZ=':Asia/Shanghai' date '+%Y%m%d')" >> $GITHUB_ENV
25-
# only first 7 chars of commit id
26-
echo "COMMIT_ID=${GITHUB_SHA::7}" >> $GITHUB_ENV
2733
- name: Build and Push CeresDB Server Docker Image
2834
uses: docker/build-push-action@v3
2935
with:
3036
context: .
3137
push: true
32-
tags: ceresdb/ceresdb-server:nightly-${{ env.BUILD_DATE }}-${{ env.COMMIT_ID }}
38+
tags: ceresdb/ceresdb-server:nightly-${{ env.BUILD_DATE }}

0 commit comments

Comments
 (0)