Skip to content

Commit 64a8810

Browse files
committed
build: pre release
1 parent 04b90dc commit 64a8810

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

.github/workflows/release.yaml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,31 +52,43 @@ jobs:
5252
- name: zip
5353
run: yarn zip
5454

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
5566
- name: Release
5667
uses: softprops/action-gh-release@v2
5768
if: startsWith(github.ref, 'refs/tags/')
5869
with:
5970
files: |
6071
info8fcc-greptimedb-datasource.zip
6172
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

Comments
 (0)