Skip to content

Commit

Permalink
updated and commented on workflow triggers, conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Moon committed Jun 20, 2024
1 parent ff2a803 commit d653272
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/artkit-release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ jobs:

conda_tox_essential:
runs-on: ubuntu-latest
needs: [ detect_build_config_changes, code_quality_checks ]
if: ${{ needs.detect_build_config_changes.outputs.conda_build_config_changed == '1' && github.event_name != 'schedule' && !startsWith(github.head_ref, 'dev/') && !startsWith(github.ref, 'refs/heads/release/') }}
needs: [ detect_build_config_changes, code_quality_checks, check_release]
# IF (no build configs changed) AND (not a scheduled run) AND (no PR creation/update merging dev/ to release/) AND (no PR merged into release/)
if: ${{ needs.detect_build_config_changes.outputs.conda_build_config_changed != '1' && github.event_name != 'schedule' && !startsWith(github.head_ref, 'dev/') && !startsWith(github.base_ref, 'release/') && !startsWith(github.ref, 'refs/heads/release/') }}
strategy:
matrix:
python-version: [ 3.11 ]
Expand Down Expand Up @@ -229,8 +230,9 @@ jobs:

conda_tox_matrix:
runs-on: ubuntu-latest
needs: [ detect_build_config_changes, code_quality_checks ]
if: startsWith(github.head_ref, 'dev/') || startsWith(github.ref, 'refs/heads/release/') || github.event_name == 'schedule'
needs: [detect_build_config_changes, code_quality_checks, check_release]
# IF (build configs changed) OR (creating/syncing PR merging dev/ into release/) OR (PR merged into release/) OR (scheduled run)
if: needs.detect_build_config_changes.outputs.conda_build_config_changed == '1' || (startsWith(github.head_ref, 'dev/') && startsWith(github.base_ref, 'release/')) || startsWith(github.ref, 'refs/heads/release/') || github.event_name == 'schedule'
strategy:
matrix:
python-version: [ 3.11 ]
Expand Down Expand Up @@ -292,7 +294,7 @@ jobs:

veracode_check:
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
if: startsWith(github.head_ref, 'dev/') || startsWith(github.ref, 'refs/heads/release/') || github.event_name == 'schedule'

steps:
- name: Checkout code
Expand Down Expand Up @@ -322,7 +324,8 @@ jobs:
check_release:
runs-on: ubuntu-latest
needs: conda_tox_matrix
if: startsWith(github.head_ref, 'dev/') || startsWith(github.ref, 'refs/heads/release/')
# IF (creating/syncing PR merging dev/ into release/) OR (PR merged into release/)
if: (startsWith(github.head_ref, 'dev/') && startsWith(github.base_ref, 'release/')) || startsWith(github.ref, 'refs/heads/release/')

steps:
- name: Checkout code
Expand Down Expand Up @@ -384,7 +387,8 @@ jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'dev/') || startsWith(github.ref, 'refs/heads/release/')
# IF (creating/syncing PR merging dev/ into release/) OR (PR merged into release/)
if: (startsWith(github.head_ref, 'dev/') && startsWith(github.base_ref, 'release/')) || startsWith(github.ref, 'refs/heads/release/')
needs: check_release
steps:
- name: Checkout code
Expand Down Expand Up @@ -482,7 +486,8 @@ jobs:

docs:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'dev/') || startsWith(github.ref, 'refs/heads/release/')
# IF (creating/syncing PR merging dev/ into release/) OR (PR merged into release/)
if: (startsWith(github.head_ref, 'dev/') && startsWith(github.base_ref, 'release/')) || startsWith(github.ref, 'refs/heads/release/')
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down

0 comments on commit d653272

Please sign in to comment.