-
Notifications
You must be signed in to change notification settings - Fork 13
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
1 parent
45d2b92
commit 63d9356
Showing
5 changed files
with
91 additions
and
113 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 |
---|---|---|
|
@@ -36,3 +36,93 @@ jobs: | |
env: | ||
PYTEST_MARK: ${{ matrix.mark }} | ||
run: pytest -m $PYTEST_MARK | ||
docker: | ||
needs: test | ||
name: "Build Docker container" | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: docker/setup-qemu-action@v1 | ||
- uses: docker/setup-buildx-action@v1 | ||
- uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: "Get StreamFlow version" | ||
run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV | ||
- name: "Check if Docker image already exists" | ||
run: echo "NEW_IMAGE=$(docker buildx imagetools inspect alphaunito/streamflow:${STREAMFLOW_VERSION} > /dev/null 2>&1; echo $?)" >> $GITHUB_ENV | ||
- name: "Build base image" | ||
id: docker-base | ||
if: ${{ env.NEW_IMAGE }} | ||
uses: docker/build-push-action@v2 | ||
with: | ||
build-args: | | ||
HELM_VERSION=v3.7.2 | ||
push: true | ||
tags: | | ||
alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-base | ||
alphaunito/streamflow:latest | ||
- name: "Build Helm 2 image" | ||
id: docker-helm | ||
if: ${{ env.NEW_IMAGE }} | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: helm/docker/helm2/Dockerfile | ||
build-args: | | ||
BASE_IMAGE=alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-base | ||
HELM_VERSION=v2.17.0 | ||
push: true | ||
tags: alphaunito/streamflow:${{ env.STREAMFLOW_VERSION }}-helm2 | ||
github: | ||
needs: test | ||
name: "Create GitHub Release" | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: "Get StreamFlow version" | ||
run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV | ||
- name: "Check tag existence" | ||
uses: mukunku/[email protected] | ||
id: check-tag | ||
with: | ||
tag: ${{ env.STREAMFLOW_VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: "Create Release" | ||
id: create-release | ||
uses: actions/create-release@v1 | ||
if: ${{ steps.check-tag.outputs.exists == 'false' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.STREAMFLOW_VERSION }} | ||
release_name: ${{ env.STREAMFLOW_VERSION }} | ||
draft: false | ||
prerelease: false | ||
pypi: | ||
needs: test | ||
name: "Publish on PyPI" | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: "Get StreamFlow version" | ||
run: echo "STREAMFLOW_VERSION=$(cat streamflow/version.py | grep -oP '(?<=VERSION = \")(.*)(?=\")')" >> $GITHUB_ENV | ||
- name: "Get PyPI version" | ||
run: echo "PYPI_VERSION=$(pip index versions --pre streamflow | grep streamflow | sed 's/.*(\(.*\))/\1/')" >> $GITHUB_ENV | ||
- name: "Build Python packages" | ||
if: ${{ env.STREAMFLOW_VERSION != env.PYPI_VERSION }} | ||
run: | | ||
python -m pip install build --user | ||
python -m build --sdist --wheel --outdir dist/ . | ||
- name: "Publish package to PyPI" | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: ${{ env.STREAMFLOW_VERSION != env.PYPI_VERSION }} | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
VERSION = "0.1.5" | ||
VERSION = "0.1.6" |