Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Trigger TBP on pg for scheduled run on release #36399

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ on:
description: "This is the PR number in case the workflow is being called in a pull request"
required: false
type: number
is-pg-build:
description: "This is a boolean value in case the workflow is being called for a PG build"
required: false
type: string
default: "false"

jobs:
build-docker:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/test-build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

# trigger for pushes to master and pg
push:
branches: [master, pg]
branches: [master]
paths:
- "app/client/**"
- "app/server/**"
Expand Down Expand Up @@ -59,6 +59,14 @@ jobs:
echo "matrix=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]" >> $GITHUB_OUTPUT
fi

invoke-tbp-workflow-for-pg:
needs: [setup]
if: github.event_name != 'push' && github.ref == 'refs/heads/release'
uses: benc-uk/workflow-dispatch@v1
with:
workflow: test-build-docker-image.yml
inputs: '{ "ref": "pg"}'

server-build:
needs: [setup]
if: success()
Expand Down Expand Up @@ -100,7 +108,7 @@ jobs:
ci-test:
needs: [setup, build-docker-image]
# Only run if the build step is successful
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master')
name: ci-test
uses: ./.github/workflows/ci-test-custom-script.yml
secrets: inherit
Expand All @@ -113,17 +121,18 @@ jobs:
server-unit-tests:
name: server-unit-tests
needs: [build-docker-image]
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master')
uses: ./.github/workflows/server-build.yml
secrets: inherit
with:
pr: 0
skip-tests: false
is-pg-build: ${{ github.ref == 'refs/heads/pg' }}
Comment on lines 129 to +130
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! It looks like there's a type mismatch in the reusable workflow inputs.

The skip-tests and is-pg-build inputs are being assigned boolean values, but the reusable workflow ./.github/workflows/server-build.yml expects these inputs to be of type string. This mismatch can lead to unexpected behavior or errors in the server-unit-tests job.

To fix this issue, you should convert the boolean values to strings before passing them to the reusable workflow. For example:

with:
  skip-tests: ${{ false }}
  is-pg-build: ${{ github.ref == 'refs/heads/pg' }}

Would you like me to open a GitHub issue to track this task, or do you want to make the changes yourself?

Tools
actionlint

129-129: input "skip-tests" is typed as string by reusable workflow "./.github/workflows/server-build.yml". bool value cannot be assigned

(expression)


130-130: input "is-pg-build" is typed as string by reusable workflow "./.github/workflows/server-build.yml". bool value cannot be assigned

(expression)


client-unit-tests:
name: client-unit-tests
needs: [build-docker-image]
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/pg' )
if: success() && ( github.event_name != 'push' || github.ref == 'refs/heads/master')
uses: ./.github/workflows/client-unit-tests.yml
secrets: inherit
with:
Expand Down
Loading