Skip to content

Commit

Permalink
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/dorothy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,40 @@ concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
debug-env:
runs-on: ubuntu-latest
steps:
- name: 'Debug Environment'
shell: bash -leo pipefail {0}
run: |
# output github context
cat <<-EGITHUB
run?
${{ toJson( github.event_name == 'push' || ( github.event_name == 'pull_request' && toJSON(github.event.pull_request.draft) == 'false' && toJSON(github.event.pull_request.state) == '"open"' && toJSON(github.event.pull_request.assignees) != '[]' ) ) }}
github.event_name:
${{ toJson(github.event_name) }}
github.event.pull_request.draft:
${{ github.event_name == 'pull_request' && toJson(github.event.pull_request.draft) }}
github.event.pull_request.state:
${{ github.event_name == 'pull_request' && toJson(github.event.pull_request.state) }}
github.event.pull_request.assignees:
${{ github.event_name == 'pull_request' && toJson(github.event.pull_request.assignees) }}
github.event.pull_request.requested_reviewers (this seems to always be [] even if there are reviewers assigned):
${{ github.event_name == 'pull_request' && toJson(github.event.pull_request.requested_reviewers) }}
github.event.pull_request.requested_teams (this seems to always be [] even if there are teams assigned):
${{ github.event_name == 'pull_request' && toJson(github.event.pull_request.requested_teams) }}
github:
${{ toJson(github) }}
EGITHUB
login-shells-and-linting:
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && (toJSON(github.event.pull_request.requested_reviewers) != '[]' || toJSON(github.event.pull_request.requested_teams) != '[]' ) )
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && toJSON(github.event.pull_request.draft) == 'false' && toJSON(github.event.pull_request.state) == '"open"' && toJSON(github.event.pull_request.assignees) != '[]' )
runs-on: ubuntu-latest
steps:
- name: 'Dorothy Install'
Expand Down Expand Up @@ -112,7 +144,7 @@ jobs:
run: dorothy check
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runner-test:
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && (toJSON(github.event.pull_request.requested_reviewers) != '[]' || toJSON(github.event.pull_request.requested_teams) != '[]' ) )
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && toJSON(github.event.pull_request.draft) == 'false' && toJSON(github.event.pull_request.state) == '"open"' && toJSON(github.event.pull_request.assignees) != '[]' )
strategy:
fail-fast: false
matrix:
Expand All @@ -127,7 +159,7 @@ jobs:
# ensure dorothy is cloned, and run command
bash -c "$(curl -fsSL 'https://dorothy.bevry.me/run?slug=${{ github.repository }}&commit=${{ github.event.pull_request.head.sha || github.sha }}')" -- dorothy test
fresh-macos-test:
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && (toJSON(github.event.pull_request.requested_reviewers) != '[]' || toJSON(github.event.pull_request.requested_teams) != '[]' ) )
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && toJSON(github.event.pull_request.draft) == 'false' && toJSON(github.event.pull_request.state) == '"open"' && toJSON(github.event.pull_request.assignees) != '[]' )
strategy:
fail-fast: false
matrix:
Expand All @@ -145,7 +177,7 @@ jobs:
# ensure dorothy is cloned, and run command
bash -c "$(curl -fsSL 'https://dorothy.bevry.me/run?slug=${{ github.repository }}&commit=${{ github.event.pull_request.head.sha || github.sha }}')" -- dorothy test
container-test:
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && (toJSON(github.event.pull_request.requested_reviewers) != '[]' || toJSON(github.event.pull_request.requested_teams) != '[]' ) )
if: github.event_name == 'push' || ( github.event_name == 'pull_request' && toJSON(github.event.pull_request.draft) == 'false' && toJSON(github.event.pull_request.state) == '"open"' && toJSON(github.event.pull_request.assignees) != '[]' )
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down

0 comments on commit fda6973

Please sign in to comment.