Skip to content

Commit

Permalink
fix(workflow-dispatcher): Group push jobs into single job
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Feb 20, 2024
1 parent 449f629 commit c6fe344
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/workflow-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
echo "branch name: ${{ steps.branch_name.outputs.branch_name }}"
echo "cache_version: ${{ steps.cache_version.outputs.cache_version }}"
lint:
needs: trigger
uses: ./.github/workflows/lint.yaml
Expand Down Expand Up @@ -160,6 +161,7 @@ jobs:
group: R-CMD-check-${{ needs.trigger.outputs.branch_name }}
cancel-in-progress: true


code-coverage:
needs: trigger
uses: ./.github/workflows/code-coverage.yaml
Expand All @@ -178,30 +180,6 @@ jobs:
group: code-coverage-${{ needs.trigger.outputs.branch_name }}
cancel-in-progress: true

document:
needs: trigger
uses: ./.github/workflows/document.yaml
with:
run: ${{ !contains(inputs.skip, 'document') && (
inputs.event_name == 'workflow_dispatch' || (
needs.trigger.outputs.R_files_changed == 'true' ||
needs.trigger.outputs.description_changed == 'true')) }}
branch_name: ${{ needs.trigger.outputs.branch_name }}
secrets: inherit
concurrency:
group: push-${{ needs.trigger.outputs.branch_name }}

render-readme:
needs: trigger
uses: ./.github/workflows/render-readme.yaml
with:
run: ${{ !contains(inputs.skip, 'render-readme') && (
inputs.event_name == 'workflow_dispatch' ||
needs.trigger.outputs.readme_files_changed == 'true') }}
branch_name: ${{ needs.trigger.outputs.branch_name }}
secrets: inherit
concurrency:
group: push-${{ needs.trigger.outputs.branch_name }}

pkgdown:
needs: trigger
Expand All @@ -221,18 +199,40 @@ jobs:
group: pkgdown-${{ needs.trigger.outputs.branch_name }}
cancel-in-progress: true

update-lockfile:
push-jobs:
needs: trigger
uses: ./.github/workflows/update-lockfile.yaml
with:
cache_version: ${{ needs.trigger.outputs.cache_version }}
run: ${{ !contains(inputs.skip, 'update-lockfile') && (
inputs.event_name == 'workflow_dispatch' || (
needs.trigger.outputs.main_branch_affected == 'true' && (
needs.trigger.outputs.R_files_changed == 'true' ||
needs.trigger.outputs.test_files_changed == 'true' ||
needs.trigger.outputs.description_changed == 'true'))) }}
branch_name: ${{ needs.trigger.outputs.branch_name }}
secrets: inherit
concurrency:
group: push-${{ needs.trigger.outputs.branch_name }}

steps:
- name: document
uses: ./.github/workflows/document.yaml
with:
run: ${{ !contains(inputs.skip, 'document') && (
inputs.event_name == 'workflow_dispatch' || (
needs.trigger.outputs.R_files_changed == 'true' ||
needs.trigger.outputs.description_changed == 'true')) }}
branch_name: ${{ needs.trigger.outputs.branch_name }}


- name: render-readme:
uses: ./.github/workflows/render-readme.yaml
with:
run: ${{ !contains(inputs.skip, 'render-readme') && (
inputs.event_name == 'workflow_dispatch' ||
needs.trigger.outputs.readme_files_changed == 'true') }}
branch_name: ${{ needs.trigger.outputs.branch_name }}


- name: update-lockfile:
uses: ./.github/workflows/update-lockfile.yaml
with:
cache_version: ${{ needs.trigger.outputs.cache_version }}
run: ${{ !contains(inputs.skip, 'update-lockfile') && (
inputs.event_name == 'workflow_dispatch' || (
needs.trigger.outputs.main_branch_affected == 'true' && (
needs.trigger.outputs.R_files_changed == 'true' ||
needs.trigger.outputs.test_files_changed == 'true' ||
needs.trigger.outputs.description_changed == 'true'))) }}
branch_name: ${{ needs.trigger.outputs.branch_name }}

0 comments on commit c6fe344

Please sign in to comment.