Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,12 @@
!dist/*PAYG*.rpm
!dist/*fips*.rpm
test-controller-api:
if: github.event.pull_request.draft == false
needs:
- goreleaser
if: |
!cancelled() &&
needs.goreleaser.result == 'success' &&

Check failure on line 314 in .github/workflows/release.yml

View check run for this annotation

probelabs / Visor: architecture

logic Issue

The `if` condition for the `test-controller-api` job appears to be incorrect for `push` events. The expression `github.event.pull_request.draft == false` will evaluate to `false` on non-pull-request events (like `push`), causing the job to be skipped. This contradicts the PR's stated goal of enabling downstream jobs to run on `push` events. The same issue is present in the `test-controller-distros` job at line 428.
Raw output
To allow the job to run on push events as well as non-draft pull requests, the condition should be modified to check the event type explicitly. For example: `(github.event_name == 'push' || github.event.pull_request.draft == false)`.
github.event.pull_request.draft == false
runs-on: ${{ vars.DEFAULT_RUNNER }}
outputs:
envfiles: ${{ steps.params.outputs.envfiles }}
Expand All @@ -327,6 +330,10 @@
needs:
- test-controller-api
- goreleaser
if: |
!cancelled() &&
needs.goreleaser.result == 'success' &&
needs.test-controller-api.result == 'success'
runs-on: ${{ vars.DEFAULT_RUNNER }}
env:
XUNIT_REPORT_PATH: ${{ github.workspace}}/test-results.xml
Expand Down Expand Up @@ -391,7 +398,7 @@
name: Aggregated CI Status
runs-on: ${{ vars.DEFAULT_RUNNER }}
# Dynamically determine which jobs to depend on based on repository configuration
needs: [goreleaser, api-tests]
needs: [dep-guard, goreleaser, api-tests]
if: ${{ always() && github.event_name == 'pull_request' }}
steps:
- name: Aggregate results
Expand All @@ -418,9 +425,12 @@

echo "✅ All required jobs succeeded"
test-controller-distros:
if: github.event.pull_request.draft == false
needs:
- goreleaser
if: |
!cancelled() &&
needs.goreleaser.result == 'success' &&
github.event.pull_request.draft == false
runs-on: ${{ vars.DEFAULT_RUNNER }}
outputs:
deb: ${{ steps.params.outputs.deb }}
Expand All @@ -445,6 +455,9 @@
runs-on: ${{ vars.DEFAULT_RUNNER }}
needs:
- test-controller-distros
if: |
!cancelled() &&
needs.test-controller-distros.result == 'success'
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -492,6 +505,9 @@
runs-on: ${{ vars.DEFAULT_RUNNER }}
needs:
- test-controller-distros
if: |
!cancelled() &&
needs.test-controller-distros.result == 'success'
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -537,6 +553,9 @@
push: false
sbom:
needs: goreleaser
if: |
!cancelled() &&
needs.goreleaser.result == 'success'
uses: TykTechnologies/github-actions/.github/workflows/sbom.yaml@42304edda365365e0a887cf018d8edc34b960b82 # main
secrets:
DEPDASH_URL: ${{ secrets.DEPDASH_URL }}
Expand Down
Loading