-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIFlow] Add github workflow to publish aiflow docker image (#649)
* [AIFlow] Add github workflow to publish aiflow docker image (#636) * [AIFlow] Add github workflow to publish aiflow docker image * [Airflow] Allow setting image repo and image tag * [Airflow] Lint ignore frontend node_modules * [AIFlow] Ignore Lint and license check for ai_flow/frontend/dist (cherry picked from commit 6150da73c72a2225b0409d48146c48a36a4242dc) * [AIFlow] Fix AIFlow Image publish ci (#647) (cherry picked from commit 9b70ebcdad9b1b2d0599bf2d2486f235e00bb6b2)
- Loading branch information
Showing
3 changed files
with
53 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish AIFlow Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
image_repository: | ||
description: 'Image Repository' | ||
required: false | ||
default: 'flinkaiflow/flink-ai-flow-dev' | ||
image_tag: | ||
description: 'Image Tag' | ||
required: false | ||
default: '' | ||
schedule: | ||
- cron: '0 16 * * *' | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set variables | ||
env: | ||
DEFAULT_IMAGE_REPO: 'flinkaiflow/flink-ai-flow-dev' | ||
run: | | ||
IMAGE_REPO=${{ github.event.inputs.image_repository || env.DEFAULT_IMAGE_REPO }} | ||
IMAGE_TAG=${{ github.event.inputs.image_tag }} | ||
[ -z ${IMAGE_TAG} ] && IMAGE_TAG=${GITHUB_REF##*/}-`echo ${GITHUB_SHA} | cut -c1-8` | ||
echo "IMAGE_REPO=${IMAGE_REPO}" >> $GITHUB_ENV | ||
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV | ||
- name: Log in to to docker registry | ||
run: | | ||
docker login --username=${{ secrets.IMAGE_REGISTRY_USERNAME }} --password=${{ secrets.IMAGE_REGISTRY_PASSWORD }} ${{ secrets.LOGIN_REGISTRY }} | ||
- name: Build Image | ||
run: | | ||
cd ./flink-ai-flow | ||
echo building image with repo: ${{ env.IMAGE_REPO }} tag: ${{ env.IMAGE_TAG }} | ||
bash build_docker_image.sh ${{ env.IMAGE_REPO }}:${{ env.IMAGE_TAG }} | ||
- name: Push Image | ||
run: | | ||
echo pushing ${{ env.IMAGE_REPO }}:${{ env.IMAGE_TAG }} | ||
docker push ${{ env.IMAGE_REPO }}:${{ env.IMAGE_TAG }} |
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