-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix tag number for commit and link all jobs * merge the prepare flow
- Loading branch information
Showing
1 changed file
with
38 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
description: Specific version number (Optional). Default will be the current version plus 0.0.1. | ||
|
||
jobs: | ||
stable-release-wren-engine: | ||
prepare-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -18,6 +18,26 @@ jobs: | |
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "stable-release-bot" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: ./ibis-server/pyproject.toml | ||
- uses: abatilo/actions-poetry@v3 | ||
with: | ||
poetry-version: 1.7.1 | ||
- name: Prepare next version | ||
id: next_version | ||
working-directory: ibis-server | ||
run: | | ||
if [ -n "${{ github.event.inputs.specific_version }}" ]; then | ||
poetry version --next-phase ${{ github.event.inputs.specific_version }} | ||
else | ||
poetry version patch | ||
fi | ||
version=$(poetry version | awk '{print $2}') | ||
git add pyproject.toml | ||
git commit -m "Upgrade ibis version to $version" | ||
git push | ||
echo "value=$version" >> $GITHUB_OUTPUT | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v2 | ||
with: | ||
|
@@ -37,6 +57,20 @@ jobs: | |
git push | ||
git push origin $version_number | ||
echo "version_number=$version_number" >> $GITHUB_OUTPUT | ||
outputs: | ||
next_version: ${{ steps.next_version.outputs.value }} | ||
maven_version: ${{ steps.maven_prepare_release.outputs.version_number }} | ||
stable-release-wren-engine: | ||
needs: prepare-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
cache: 'maven' | ||
- name: Build | ||
run: | | ||
./mvnw clean install -B -DskipTests -P exec-jar | ||
|
@@ -58,44 +92,12 @@ jobs: | |
cp -r ../wren-sqlglot-server/ ./ | ||
docker buildx build \ | ||
--platform linux/amd64,linux/arm64 \ | ||
--tag ghcr.io/canner/wren-engine:${{ steps.maven_prepare_release.outputs.version_number }} \ | ||
--tag ghcr.io/canner/wren-engine:${{ needs.prepare-version.outputs.maven_version }} \ | ||
--tag ghcr.io/canner/wren-engine:latest \ | ||
--push -f ./Dockerfile \ | ||
--build-arg "WREN_VERSION=${WREN_VERSION}" . | ||
prepare-ibis-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GHCR_TOKEN }} | ||
- name: Set up Git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "stable-release-bot" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: ./ibis-server/pyproject.toml | ||
- uses: abatilo/actions-poetry@v3 | ||
with: | ||
poetry-version: 1.7.1 | ||
- name: Prepare next version | ||
id: next_version | ||
working-directory: ibis-server | ||
run: | | ||
if [ -n "${{ github.event.inputs.specific_version }}" ]; then | ||
poetry version --next-phase ${{ github.event.inputs.specific_version }} | ||
else | ||
poetry version patch | ||
fi | ||
git add pyproject.toml | ||
git commit -m "Upgrade ibis version to $version" | ||
git push | ||
version=$(poetry version | awk '{print $2}') | ||
echo "value=$version" >> $GITHUB_OUTPUT | ||
outputs: | ||
next_version: ${{ steps.next_version.outputs.value }} | ||
stable-release-ibis: | ||
needs: prepare-ibis-version | ||
needs: prepare-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -105,7 +107,7 @@ jobs: | |
with: | ||
images: ghcr.io/canner/wren-engine-ibis | ||
tags: | | ||
type=raw,value=${{ needs.prepare-ibis-version.outputs.next_version }} | ||
type=raw,value=${{ needs.prepare-version.outputs.next_version }} | ||
type=raw,value=latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
|