Skip to content

added docs

added docs #7

Workflow file for this run

name: CI/CD
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: |
pio run
pio run --target buildfs
- name: Package
if: startsWith(github.ref, 'refs/tags/')
run: |
platformio run -t upload -v 2>/dev/null | grep -e "--chip esp32s3" | awk '{for (i = 1; i <= NF; i++) {if ($i ~ /^0x[0-9a-fA-F]+$/) offset = $i; else if ($i ~ /\.bin$/) {gsub(/^.*\//, "", $i); print offset, $i}}}' > .pio/build/offsets.txt
grep 'storage' partitions.csv | awk -F, '{print $4 " spiffs.bin"}' | sed 's/^ //g' >> .pio/build/offsets.txt
awk '{printf "{\"offset\":\"%s\", \"file\":\"%s\"}\n", $1, $2}' .pio/build/offsets.txt | jq -c -s '.' > .pio/build/offsets.json
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
/home/runner/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
.pio/build/${{github.event.repository.name}}/bootloader.bin
.pio/build/${{github.event.repository.name}}/firmware.bin
.pio/build/${{github.event.repository.name}}/partitions.bin
.pio/build/${{github.event.repository.name}}/spiffs.bin
.pio/build/offsets.json
token: ${{secrets.ACTION_RELEASE_TOKEN}}
generate_release_notes: true
make_latest: true
- name: GitHubAssistantBot Preprocess
id: preprocess_commits
if: success() || failure()
run: |
commits_json=$(cat <<EOL
${{toJson(github.event.commits)}}
EOL
)
echo "commits=$(echo "$commits_json" | jq -c '[.[] | {message: .message, url: .url}]' || echo "[]")" >> $GITHUB_OUTPUT
- name: GitHubAssistantBot
if: success() || failure()
uses: fjogeleit/http-request-action@v1
with:
url: 'https://node-red.geeken.me/github_assistant_bot'
data: |
{
"key": "${{secrets.ASSISTANT_BOT_KEY}}",
"actor": "${{github.actor}}",
"changes": "https://github.com/${{github.repository}}/commit/${{github.sha}}",
"commits": ${{steps.preprocess_commits.outputs.commits}},
"event": "${{github.event_name}}",
"reference": "${{github.ref_name}}",
"report": "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}",
"repository": "${{github.repository}}",
"status": "${{job.status}}"
}