Skip to content

Commit

Permalink
checking for workflow_dispatch event along with forked repo flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sacpis committed Jul 16, 2024
1 parent ec6958a commit a716073
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
metadata:
name: Retrieve PR info
runs-on: ubuntu-latest
if: ${{ ! github.event.repository.fork }}
if: ${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }}
permissions:
pull-requests: read

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean_caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ name: Clean GitHub caches
jobs:
automatic_cleanup:
name: Clean up GitHub caches produced by other workflows
if: (${{ ! github.event.repository.fork }} && github.event_name == 'workflow_run')
if: (${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }} && github.event_name == 'workflow_run')
permissions: write-all
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_cache_command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Create CI cache
jobs:
pr_info:
name: Determine PR info
if: ${{ ! github.event.repository.fork }}
if: ${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }}
runs-on: ubuntu-latest

outputs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Delete tags
jobs:
ghcr_images:
name: Clean up GHCR image tags
if: ${{ ! github.event.repository.fork }}
if: ${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }}
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
publish_docs:
name: Publish documentation
runs-on: ubuntu-latest
if: (${{ ! github.event.repository.fork }} && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.name == 'CI' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.actor.id == '135836288')))
if: (${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }} && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.name == 'CI' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.actor.id == '135836288')))

permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Update GHCR
jobs:
ghcr_config:
name: Read GHCR config
if: (${{ ! github.event.repository.fork }} && (github.event_name == 'workflow_dispatch' || vars.enabled_workflows == 'all'))
if: (${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }} && (github.event_name == 'workflow_dispatch' || vars.enabled_workflows == 'all'))
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
# `env` context is unavailable outside of "steps" contexts.
setup:
name: Set variables
if: ${{ ! github.event.repository.fork }}
if: ${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }}
runs-on: ubuntu-latest
outputs:
cudaq_test_image: ${{ steps.vars.outputs.cudaq_test_image }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nvqc_regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
# `env` context is unavailable outside of "steps" contexts.
setup:
name: Set variables
if: ${{ ! github.event.repository.fork }}
if: ${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }}
runs-on: ubuntu-latest
outputs:
cudaq_test_image: ${{ steps.vars.outputs.cudaq_test_image }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ name: Publishing
jobs:
assets:
name: Assets
if: (${{ ! github.event.repository.fork }} && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'))
if: (${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }} && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'))
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publishing_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name: Push stable release
jobs:
ngc_quantum:
name: Publish to stable
if: ${{ ! github.event.repository.fork }}
if: ${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
links:
runs-on: ubuntu-latest
name: "Check links"
if: ${{ ! github.event.repository.fork }}
if: ${{ github.event_name == 'workflow_dispatch' || ! github.event.repository.fork }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down

0 comments on commit a716073

Please sign in to comment.