-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
113 additions
and
38 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
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
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
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: release oceanbase-ce image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache_key: | ||
required: true | ||
type: string | ||
version: | ||
required: true | ||
type: string | ||
lts: | ||
required: true | ||
type: boolean | ||
|
||
jobs: | ||
release-oceanbase-ce: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free disk space on Ubuntu runner | ||
uses: kfir4444/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
swap-storage: true | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to Docker hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Log in to Quay io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_IO_USERNAME }} | ||
password: ${{ secrets.QUAY_IO_PASSWORD }} | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.cache_key }} | ||
path: /tmp | ||
|
||
- name: Load observer images | ||
run: | | ||
docker load -i /tmp/oceanbase-ce-amd64.tar | ||
rm -f /tmp/oceanbase-ce-amd64.tar | ||
docker load -i /tmp/oceanbase-ce-arm64.tar | ||
rm -f /tmp/oceanbase-ce-arm64.tar | ||
- name: Publish observer images with version tag | ||
run: | | ||
docker buildx imagetools create --tag oceanbase-ce ${{ inputs.image_name }}-amd64 ${{ inputs.image_name }}-arm64 | ||
docker tag oceanbase-ce ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:${{ inputs.version }} | ||
docker push ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:${{ inputs.version }} | ||
docker tag oceanbase-ce quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:${{ inputs.version }} | ||
docker push quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:${{ inputs.version }} | ||
docker tag oceanbase-ce ghcr.io/${{ github.repository_owner }}/oceanbase-ce:${{ inputs.version }} | ||
docker push ghcr.io/${{ github.repository_owner }}/oceanbase-ce:${{ inputs.version }} | ||
- name: Publish observer images with lts tag | ||
if: ${{ inputs.lts }} | ||
run: | | ||
lts_version=$(echo $tagName | grep -P '(\d*\.\d*\.\d*)' --only-matching) | ||
lts_tag="${lts_version}-lts" | ||
docker tag oceanbase-ce ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:$lts_tag | ||
docker tag oceanbase-ce ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:latest | ||
docker push ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:$lts_tag | ||
docker push ${{ vars.DOCKER_PUSH_BASE }}/oceanbase-ce:latest | ||
docker tag oceanbase-ce quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:$lts_tag | ||
docker tag oceanbase-ce quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:latest | ||
docker push quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:$lts_tag | ||
docker push quay.io/${{ vars.QUAY_IO_PUSH_BASE }}/oceanbase-ce:latest | ||
docker tag oceanbase-ce ghcr.io/${{ github.repository_owner }}/oceanbase-ce:$lts_tag | ||
docker tag oceanbase-ce ghcr.io/${{ github.repository_owner }}/oceanbase-ce:latest | ||
docker push ghcr.io/${{ github.repository_owner }}/oceanbase-ce:$lts_tag | ||
docker push ghcr.io/${{ github.repository_owner }}/oceanbase-ce:latest |
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
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