Skip to content

Commit

Permalink
workflow refactor to used shared build file
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Nov 27, 2024
1 parent ca176c7 commit feab272
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: WLED CI

on: [push, pull_request]
name: WLED Build

# Only included into other workflows
on:
workflow_call:

jobs:

get_default_envs:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/wled-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: WLED CI

on:
push:
branches:
- '*'
pull_request:

jobs:
wled_build:
uses: ./.github/workflows/build.yml

5 comments on commit feab272

@w00000dy
Copy link
Contributor

Choose a reason for hiding this comment

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

Why make it more complicated and split the workflow into two files, build.yml and wled-ci.yml?

@netmindz
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See the later commits, but you don't want release task for non-releases and also be able to do more automation for the actual release and this requires you start with a build. See GitHub's docs for best practice for more details

@w00000dy
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't say anything about the release splitting. That's fine. But why having a wled-ci.yml that then starts build.yml? Why not just add

on:
  push:
    branches:
      - '*'

to build.yml?

@netmindz
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because that's not how GitHub recommend you build up workflows

@w00000dy
Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, thanks, I didn't know that! 😄

Please sign in to comment.