Skip to content

Commit b6d7803

Browse files
authoredSep 3, 2024··
fix: run build and test on main branch (#168)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description Updated CI/CD pipelines to run the build and acceptance test stages on the main branch after a PR has been created ## Context <!-- Why is this change required? What problem does it solve? --> ## Type of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [ ] Refactoring (non-breaking change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I am familiar with the [contributing guidelines](../docs/CONTRIBUTING.md) - [x] I have followed the code style of the project - [ ] I have added tests to cover my changes - [ ] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [x] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent 51d5f13 commit b6d7803

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎.github/workflows/cicd-1-pull-request.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
name: "Build stage"
104104
needs: [metadata, test-stage]
105105
uses: ./.github/workflows/stage-3-build.yaml
106-
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
106+
if: github.ref == 'refs/heads/main' || needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
107107
with:
108108
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
109109
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
@@ -117,7 +117,7 @@ jobs:
117117
name: "Acceptance stage"
118118
needs: [metadata, build-stage]
119119
uses: ./.github/workflows/stage-4-acceptance.yaml
120-
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
120+
if: github.ref == 'refs/heads/main' || needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
121121
with:
122122
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
123123
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"

0 commit comments

Comments
 (0)
Please sign in to comment.