@@ -52,31 +52,43 @@ jobs:
52
52
- name : zip
53
53
run : yarn zip
54
54
55
+ - name : Determine Release Type
56
+ id : release_type
57
+ shell : bash
58
+ run : |
59
+ if [[ "${GITHUB_REF}" == *"-rc"* ]]; then
60
+ echo "::set-output name=prerelease::true"
61
+ echo "Release is a pre-release"
62
+ else
63
+ echo "::set-output name=prerelease::false"
64
+ echo "Release is a production release"
65
+ fi
55
66
- name : Release
56
67
uses : softprops/action-gh-release@v2
57
68
if : startsWith(github.ref, 'refs/tags/')
58
69
with :
59
70
files : |
60
71
info8fcc-greptimedb-datasource.zip
61
72
info8fcc-greptimedb-datasource-unsigned.zip
62
-
63
- - uses : docker/setup-qemu-action@v3
64
-
65
- - uses : docker/setup-buildx-action@v3
66
-
67
- - uses : docker/login-action@v3
68
- with :
69
- username : ${{ secrets.DOCKERHUB_USERNAME }}
70
- password : ${{ secrets.DOCKERHUB_TOKEN }}
71
-
72
- - name : Build and push
73
- uses : docker/build-push-action@v6
74
- if : startsWith(github.ref, 'refs/tags/')
75
- with :
76
- context : .
77
- file : docker/Dockerfile
78
- push : true
79
- platforms : " linux/amd64,linux/arm64"
80
- tags : |
81
- greptime/grafana-greptimedb:${{ env.GRAFANA_VERSION }}-greptime-${{ github.ref_name }}
82
- greptime/grafana-greptimedb:latest
73
+ prerelease : ${{ steps.release_type.outputs.prerelease }} # Use the output from the previous step
74
+
75
+ # - uses: docker/setup-qemu-action@v3
76
+
77
+ # - uses: docker/setup-buildx-action@v3
78
+
79
+ # - uses: docker/login-action@v3
80
+ # with:
81
+ # username: ${{ secrets.DOCKERHUB_USERNAME }}
82
+ # password: ${{ secrets.DOCKERHUB_TOKEN }}
83
+
84
+ # - name: Build and push
85
+ # uses: docker/build-push-action@v6
86
+ # if: startsWith(github.ref, 'refs/tags/')
87
+ # with:
88
+ # context: .
89
+ # file: docker/Dockerfile
90
+ # push: true
91
+ # platforms: "linux/amd64,linux/arm64"
92
+ # tags: |
93
+ # greptime/grafana-greptimedb:${{ env.GRAFANA_VERSION }}-greptime-${{ github.ref_name }}
94
+ # ${{ steps.release_type.outputs.prerelease == 'false' && format('greptime/grafana-greptimedb:latest') || '' }}
0 commit comments