Skip to content

Commit

Permalink
chore: don't diff db on main (#781)
Browse files Browse the repository at this point in the history
Makes the currently "failing" build on main pass by bypassing the
`diff-db` job that is not useful on `main`.
With this we can actually see if everything is alright on main by
looking at the status of the latest commit.

<img width="615" alt="image"
src="https://github.com/cdklabs/awscdk-service-spec/assets/379814/9c7d6683-e747-4809-9244-a5f300faf223">
  • Loading branch information
mrgrain authored Dec 20, 2023
1 parent a6e13a9 commit 9a24c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion projenrc/diff-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class DiffDb extends pj.Component {
runsOn: this.workflowRunsOn,
env: { CI: 'true' },
permissions: {},
if: "github.event_name == 'pull_request' || github.event_name == 'pull_request_target'",
steps: [
{
name: 'Checkout',
Expand Down Expand Up @@ -83,7 +84,7 @@ export class DiffDb extends pj.Component {
private diffDatabase() {
this.workflow.addJob('diff-db', {
needs: ['build', 'base-database'],
if: '!(needs.build.outputs.self_mutation_happened)',
if: "!(needs.build.outputs.self_mutation_happened) && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target')",
runsOn: this.workflowRunsOn,
env: { CI: 'true' },
permissions: {
Expand Down

0 comments on commit 9a24c64

Please sign in to comment.