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