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