-
Notifications
You must be signed in to change notification settings - Fork 0
Host M-1 WLED 16.0.1 manifest on GitHub Pages #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,37 @@ | ||||||||||||||||||||||||||||||||||||||
| name: Deploy Apollo M-1 installer Pages | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||||||||||||||
| types: [published] | ||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||
| pages: write | ||||||||||||||||||||||||||||||||||||||
| id-token: write | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||
| group: apollo-pages | ||||||||||||||||||||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||
| deploy: | ||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||
| environment: | ||||||||||||||||||||||||||||||||||||||
| name: github-pages | ||||||||||||||||||||||||||||||||||||||
| url: ${{ steps.deployment.outputs.page_url }} | ||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Add a descriptive name to the step. As per path instructions, every step must have a descriptive 🧰 Tools🪛 zizmor (1.26.1)[warning] 24-24: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Path instructions |
||||||||||||||||||||||||||||||||||||||
| - name: Stage manifest and firmware | ||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||
| GH_TOKEN: ${{ github.token }} | ||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||
| mkdir _site | ||||||||||||||||||||||||||||||||||||||
| cp apollo/installer/manifest.json _site/manifest.json | ||||||||||||||||||||||||||||||||||||||
| gh release download --repo "$GITHUB_REPOSITORY" \ | ||||||||||||||||||||||||||||||||||||||
| --pattern 'M-1_full_install.bin' --dir _site | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Specify the release tag when downloading. If an older historic release is published, To safely pass the tag into the script without command injection, it is passed via an 💡 Proposed fix - name: Stage manifest and firmware
env:
GH_TOKEN: ${{ github.token }}
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
mkdir _site
cp apollo/installer/manifest.json _site/manifest.json
- gh release download --repo "$GITHUB_REPOSITORY" \
- --pattern 'M-1_full_install.bin' --dir _site
+ if [ -z "$RELEASE_TAG" ]; then
+ gh release download --repo "$GITHUB_REPOSITORY" --pattern 'M-1_full_install.bin' --dir _site
+ else
+ gh release download "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --pattern 'M-1_full_install.bin' --dir _site
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Path instructions |
||||||||||||||||||||||||||||||||||||||
| - uses: actions/upload-pages-artifact@v3 | ||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||
| path: _site | ||||||||||||||||||||||||||||||||||||||
| - id: deployment | ||||||||||||||||||||||||||||||||||||||
| uses: actions/deploy-pages@v4 | ||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "name": "Apollo M-1", | ||
| "version": "16.0.1", | ||
| "home_assistant_domain": "wled", | ||
| "new_install_prompt_erase": true, | ||
| "builds": [ | ||
| { "chipFamily": "ESP32-S3", "parts": [ { "path": "M-1_full_install.bin", "offset": 0 } ] } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add descriptive names to jobs and steps.
As per path instructions, every workflow, job, and step must have a descriptive
nameproperty. Several blocks are missing this attribute..github/workflows/apollo-pages.yml#L18-L18: Add anameproperty to thedeployjob..github/workflows/apollo-pages.yml#L24-L24: Add anameproperty to the checkout step..github/workflows/apollo-pages.yml#L33-L35: Add anameproperty to theupload-pages-artifactstep..github/workflows/apollo-pages.yml#L36-L37: Add anameproperty to thedeploy-pagesstep.📍 Affects 1 file
.github/workflows/apollo-pages.yml#L18-L18(this comment).github/workflows/apollo-pages.yml#L24-L24.github/workflows/apollo-pages.yml#L33-L35.github/workflows/apollo-pages.yml#L36-L37🤖 Prompt for AI Agents
Source: Path instructions