Skip to content

Commit

Permalink
Notify when built
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanlundvall committed Jan 2, 2024
1 parent a813d20 commit 27653de
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,24 @@ jobs:
with:
name: firmware
path: .pio/build/featheresp32/firmware.bin

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install @actions/http-client

- name: HTTP Push
run: |
const http = require('@actions/http-client');
let httpc = new http.HttpClient('github-actions');
(async () => {
let res = await httpc.post('http://www.lundvall.info/templog/firmware', JSON.stringify({run_id: process.env.GITHUB_RUN_ID}));
if (res.message.statusCode != 200) {
throw new Error(`Failed to push: ${res.message.statusMessage}`);
}
})();
env:
GITHUB_RUN_ID: ${{ github.run_id }}

0 comments on commit 27653de

Please sign in to comment.