update logs. fix upload #331
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
name: Workflows CI | |
on: | |
push: | |
branches: [ dev, staging, test, release-** ] | |
pull_request: | |
branches: [ dev, staging, test, release-** ] | |
jobs: | |
api-tests: | |
name: Run API Tests | |
runs-on: ubuntu-latest | |
steps: | |
- run: "echo 'running API tests'" | |
Resolve_Image_Tag: | |
runs-on: ubuntu-latest | |
outputs: | |
image_tag: ${{ steps.set_image_tag.outputs.image_tag }} | |
steps: | |
- name: Extract_Branch_Name | |
# Map a step output to a job output | |
shell: bash | |
run: echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Check_Is_Production_Release | |
id: check_is_production_release | |
shell: bash | |
run: | | |
if [ "${{ contains(steps.extract_branch.outputs.branch_name, 'release-') }}" = true ]; then | |
echo "is_production_release=true" >> $GITHUB_OUTPUT; | |
else | |
echo "is_production_release=false" >> $GITHUB_OUTPUT; | |
fi | |
- name: Extract Production Release Version | |
if: ${{ steps.check_is_production_release.outputs.is_production_release == 'true' }} | |
shell: bash | |
run: echo version=$(echo ${{ steps.extract_branch.outputs.branch_name }} | sed -e 's!release-!!') >> $GITHUB_OUTPUT | |
id: extract_version | |
- name: Extract_Image_Tag | |
shell: bash | |
run: | | |
if [ "${{ steps.check_is_production_release.outputs.is_production_release }}" == true ]; then | |
echo "image_tag=${{ steps.extract_version.outputs.version }}" >> $GITHUB_OUTPUT; | |
else | |
echo "image_tag=${{ steps.extract_branch.outputs.branch_name }}" >> $GITHUB_OUTPUT; | |
fi | |
id: set_image_tag | |
Build_Push_Image_Api: | |
needs: | |
- Resolve_Image_Tag | |
runs-on: ubuntu-latest | |
name: Build_Push_Api_Image | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }} | |
- name: Build_Tapis_Workflows_Api_Image | |
run: | | |
BRANCH="${{ needs.Resolve_Image_Tag.outputs.image_tag }}" | |
if [ "${{ contains(needs.Resolve_Image_Tag.outputs.image_tag, 'refs/pull/') }}" == true ]; then | |
BRANCH=dev | |
fi | |
docker build -f src/api/src/Dockerfile -t tapis/workflows-api:$BRANCH . | |
- name: Push_All_Tags | |
run: docker push --all-tags tapis/workflows-api | |
Build_Push_Image_Engine: | |
needs: | |
- Resolve_Image_Tag | |
runs-on: ubuntu-latest | |
name: Build_Push_Engine_Image | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }} | |
- name: Build_Tapis_Workflows_Engine_Image | |
run: | | |
BRANCH="${{ needs.Resolve_Image_Tag.outputs.image_tag }}" | |
if [ "${{ contains(needs.Resolve_Image_Tag.outputs.image_tag, 'refs/pull/') }}" == true ]; then | |
BRANCH=dev | |
fi | |
docker build -f src/engine/src/Dockerfile -t tapis/workflows-pipelines:$BRANCH . | |
- name: Push_All_Tags | |
run: docker push --all-tags tapis/workflows-pipelines | |
Build_Push_Image_Engine_Streams: | |
needs: | |
- Resolve_Image_Tag | |
runs-on: ubuntu-latest | |
name: Build_Push_Engine_Streams_Image | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }} | |
- name: Build_Tapis_Workflows_Engine_Streams_Image | |
run: | | |
BRANCH="${{ needs.Resolve_Image_Tag.outputs.image_tag }}" | |
if [ "${{ contains(needs.Resolve_Image_Tag.outputs.image_tag, 'refs/pull/') }}" == true ]; then | |
BRANCH=dev | |
fi | |
docker build -f src/engine-streams/src/Dockerfile -t tapis/workflow-engine-streams:$BRANCH . | |
- name: Push_All_Tags | |
run: docker push --all-tags tapis/workflow-engine-streams | |
Build_Push_Image_Python_Singularity: | |
needs: | |
- Resolve_Image_Tag | |
runs-on: ubuntu-latest | |
name: Build_Push_Python_Sinuglarity_Image | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.TAPIS_DOCKERHUB_USERNAME }} | |
password: ${{ secrets.TAPIS_DOCKERHUB_ACCESS_TOKEN }} | |
- name: Build_Tapis_Python_Singularity_Image | |
run: | | |
docker build -f src/engine/src/contrib/tapis/images/python-singularity/Dockerfile -t tapis/workflows-python-singularity:0.1.0 src/engine/src/contrib/tapis/images/python-singularity | |
- name: Push_All_Tags | |
run: docker push --all-tags tapis/workflows-python-singularity |