Skip to content

Commit

Permalink
clean up names
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Dec 3, 2024
1 parent f6c5f4b commit a26d81e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions .github/actions/determine_workflow_config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ outputs:
runs:
using: 'composite'
steps:
- id: determine-workflow-context
- id: workflow-context
uses: ./.github/actions/determine_workflow_context

- id: determine_workflow_config
Expand All @@ -55,15 +55,15 @@ runs:
echo "link-azle=${{ inputs.link-azle-dispatch-input-value }}" >> $GITHUB_OUTPUT
echo "fuzz=${{ inputs.fuzz-dispatch-input-value }}" >> $GITHUB_OUTPUT
else
EXCLUDE_SLOW=${{ steps.determine-workflow-context.outputs.is_feature_branch_draft_pr == 'true' }}
EXCLUDE_UNSTABLE=${{ steps.determine-workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.determine-workflow-context.outputs.is_feature_branch_pr == 'true' }}
EXCLUDE_RELEASE_ONLY=${{ steps.determine-workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.determine-workflow-context.outputs.is_feature_branch_pr == 'true' || steps.determine-workflow-context.outputs.is_main_branch_push == 'true' }}
EXCLUDE_SLOW=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' }}
EXCLUDE_UNSTABLE=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' }}
EXCLUDE_RELEASE_ONLY=${{ steps.workflow-context.outputs.is_feature_branch_draft_pr == 'true' || steps.workflow-context.outputs.is_feature_branch_pr == 'true' || steps.workflow-context.outputs.is_main_branch_push == 'true' }}
echo "exclude-slow=$EXCLUDE_SLOW" >> $GITHUB_OUTPUT
echo "exclude-unstable=$EXCLUDE_UNSTABLE" >> $GITHUB_OUTPUT
echo "exclude-release-only=$EXCLUDE_RELEASE_ONLY" >> $GITHUB_OUTPUT
if [[ "${{ steps.determine-workflow-context.outputs.is_main_branch_push_from_release_merge }}" == "true" || \
"${{ steps.determine-workflow-context.outputs.is_release_branch_pr }}" == "true" ]]; then
if [[ "${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }}" == "true" || \
"${{ steps.workflow-context.outputs.is_release_branch_pr }}" == "true" ]]; then
echo "link-azle=false" >> $GITHUB_OUTPUT
else
echo "link-azle=true" >> $GITHUB_OUTPUT
Expand Down
12 changes: 6 additions & 6 deletions .github/actions/determine_workflow_context/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
steps:
- uses: actions/checkout@v4

- id: determine-workflow-context
- id: workflow-context
uses: ./.github/actions/determine_workflow_context

- name: Use run conditions
run: |
echo "Is main branch push: ${{ steps.determine-workflow-context.outputs.is_main_branch_push }}"
echo "Is main branch merge from release: ${{ steps.determine-workflow-context.outputs.is_main_branch_merge_from_release_push }}"
echo "Is release branch PR: ${{ steps.determine-workflow-context.outputs.is_release_branch_pr }}"
echo "Is feature branch PR: ${{ steps.determine-workflow-context.outputs.is_feature_branch_pr }}"
echo "Is feature branch draft PR: ${{ steps.determine-workflow-context.outputs.is_feature_branch_draft_pr }}"
echo "Is main branch push: ${{ steps.workflow-context.outputs.is_main_branch_push }}"
echo "Is main branch merge from release: ${{ steps.workflow-context.outputs.is_main_branch_merge_from_release_push }}"
echo "Is release branch PR: ${{ steps.workflow-context.outputs.is_release_branch_pr }}"
echo "Is feature branch PR: ${{ steps.workflow-context.outputs.is_feature_branch_pr }}"
echo "Is feature branch draft PR: ${{ steps.workflow-context.outputs.is_feature_branch_draft_pr }}"
```
12 changes: 6 additions & 6 deletions .github/actions/determine_workflow_context/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ description: 'Determines the workflow context based on the current GitHub contex
outputs:
is_main_branch_push:
description: 'True if this is a push to the main branch (excluding merges from release branches)'
value: ${{ steps.determine-workflow-context.outputs.is_main_branch_push }}
value: ${{ steps.workflow-context.outputs.is_main_branch_push }}
is_main_branch_push_from_release_merge:
description: 'True if this is a push to the main branch from a release branch merge'
value: ${{ steps.determine-workflow-context.outputs.is_main_branch_push_from_release_merge }}
value: ${{ steps.workflow-context.outputs.is_main_branch_push_from_release_merge }}
is_release_branch_pr:
description: 'True if this is a pull request from a release branch'
value: ${{ steps.determine-workflow-context.outputs.is_release_branch_pr }}
value: ${{ steps.workflow-context.outputs.is_release_branch_pr }}
is_feature_branch_pr:
description: 'True if this is a pull request from a feature branch (non-draft)'
value: ${{ steps.determine-workflow-context.outputs.is_feature_branch_pr }}
value: ${{ steps.workflow-context.outputs.is_feature_branch_pr }}
is_feature_branch_draft_pr:
description: 'True if this is a draft pull request from a feature branch'
value: ${{ steps.determine-workflow-context.outputs.is_feature_branch_draft_pr }}
value: ${{ steps.workflow-context.outputs.is_feature_branch_draft_pr }}
runs:
using: 'composite'
steps:
- id: determine-workflow-context
- id: workflow-context
run: |
# Define conditions using shell variables
AZLE_IS_MAIN_BRANCH_PUSH=${{ github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'demergent-labs/release--') }}
Expand Down

0 comments on commit a26d81e

Please sign in to comment.