Skip to content

feat: allow create Release externally with project-specific API Key authorization#10

Merged
becem-gharbi merged 7 commits intodevfrom
feat/github-cicd
May 22, 2024
Merged

feat: allow create Release externally with project-specific API Key authorization#10
becem-gharbi merged 7 commits intodevfrom
feat/github-cicd

Conversation

@becem-gharbi
Copy link
Collaborator

@becem-gharbi becem-gharbi commented May 22, 2024

This PR introduces a new API to create project releases which previously only supported manually via the web application.

  • The user should set an API key for a specific project.
  • A new release can be created, meaning on the database with firmware binary upload and mqtt update message published, via a fetch request to [POST] /api/releases?ci=true with API key passed on Api-Key header and a form data body with fields version projectId file.
curl -X POST https://app.esp-admin.tn/api/releases?ci=true ^
-H "Api-Key:API_KEY" ^
-F "projectId=PROJECT_ID" ^
-F "version=VERSION" ^
-F "file=@.pio\build\esp32dev\firmware.bin"

@becem-gharbi becem-gharbi merged commit 9d7347d into dev May 22, 2024
@becem-gharbi becem-gharbi deleted the feat/github-cicd branch May 22, 2024 15:23
@netlify
Copy link

netlify bot commented May 22, 2024

Deploy Preview for esp-admin ready!

Name Link
🔨 Latest commit 6d9f8c7
🔍 Latest deploy log https://app.netlify.com/sites/esp-admin/deploys/664e0ddbdb43e400087a56b8
😎 Deploy Preview https://deploy-preview-10--esp-admin.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@becem-gharbi becem-gharbi changed the title feat: allow create Release externally with project-scope API Key authorization feat: allow create Release externally with project-specific API Key authorization May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant