File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 5
5
schedule :
6
6
- cron : ' 10 20 * * *'
7
7
8
+ env :
9
+ REGISTRY : ghcr.io
10
+
8
11
jobs :
9
12
docker :
10
13
if : github.repository_owner == 'CeresDB'
11
14
runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : read
17
+ packages : write
12
18
steps :
13
19
- name : Checkout
14
20
uses : actions/checkout@v3
15
21
- name : Set up Docker Buildx
16
22
uses : docker/setup-buildx-action@v2
17
- - name : Login to DockerHub
23
+ - name : Login to Container Registry
18
24
uses : docker/login-action@v2
19
25
with :
20
- username : ${{ secrets.DOCKERHUB_USERNAME }}
21
- password : ${{ secrets.DOCKERHUB_TOKEN }}
26
+ registry : ${{ env.REGISTRY }}
27
+ username : ${{ github.actor }}
28
+ password : ${{ secrets.GITHUB_TOKEN }}
22
29
- name : Set Environment Variables
23
30
run : |
24
31
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
27
32
- name : Build and Push CeresDB Server Docker Image
28
33
uses : docker/build-push-action@v3
29
34
with :
30
35
context : .
31
36
push : true
32
- tags : ceresdb/ceresdb-server:nightly-${{ env.BUILD_DATE }}-${{ env.COMMIT_ID }}
37
+ tags : ceresdb/ceresdb-server:nightly-${{ env.BUILD_DATE }}
You can’t perform that action at this time.
0 commit comments