Skip to content

Build_special_firmware #2835

Build_special_firmware

Build_special_firmware #2835

name: Build_special_firmware
on:
repository_dispatch:
workflow_dispatch:
push:
branches: start_build
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory
# Ensures that only one deploy task per branch/environment will run at a time.
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true
jobs:
tasmota_pull:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.MASTER_ACCESS_TOKEN }}
fetch-depth: 0
ref: special_builder
- name: Use latest Tasmota development
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git remote add -f Tasmota "https://github.com/arendst/Tasmota.git" --track development
git switch -c work
git merge Tasmota/development --allow-unrelated-histories
- name: Push updates of latest Tasmota development to repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MASTER_ACCESS_TOKEN }}
branch: 'special_builder'
special:
needs: tasmota_pull
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
variant:
- tasmota-tls
- tasmota-gps
- tasmota-battery
- tasmota-scripting
- tasmota-mega
- tasmota-allsensors
- tasmota-teleinfo
- tasmota-thermostat
- tasmota-rangeextender
- tasmota-platinum
- tasmota-titanium
- tasmota-minicustom
- tasmota32-teleinfo
- tasmota32c3-teleinfo
- tasmota32c6-teleinfo
- tasmota32s2-teleinfo
- tasmota32s3-teleinfo
- tasmota32-thermostat
- tasmota32solo1-thermostat
- tasmota32solo1-bluetooth
- tasmota32-zigbee
- tasmota32-zigbeebridge
- tasmota32-gps
- tasmota32-battery
- tasmota32-scripting
- tasmota32-mega
- tasmota32-allsensors
- tasmota32-platinum
- tasmota32-titanium
#- tasmota32-rangeextender
- tasmota32c3_2M
- tasmota32c2-bluetooth
- tasmota32c3-bluetooth
- tasmota32c6-bluetooth
- tasmota32c3-lvgl
- tasmota32c6-lvgl
- tasmota32s2-lvgl
- tasmota32s3-lvgl
- tasmota32s3-qio_opi
- tasmota32s3-opi_opi
#- tasmota32s2-display
#- tasmota32s3-display
#- tasmota32c3-display
- tasmota32s3-bluetooth
- tasmota32s3-box
- tasmota32c2-mi32
- tasmota32c3-mi32
- tasmota32c6-mi32
- tasmota32s3-mi32
- tasmota32-mi32
- tasmota32c2_2M
steps:
- uses: actions/checkout@v4
with:
ref: special_builder
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -U https://github.com/platformio/platformio/archive/develop.zip
curl -O https://raw.githubusercontent.com/Jason2866/Tasmota-build/start_build/copy_safeboot.py
python copy_safeboot.py
mkdir -p ./firmware/firmware
mv tasmota32* ./firmware/firmware
ls -l ./firmware/firmware
COMMIT_SHA_LONG=$(curl -s "https://api.github.com/repos/arendst/tasmota/commits/development" | jq -r '.sha')
COMMIT_SHA=${COMMIT_SHA_LONG::7}
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT $COMMIT_SHA-/g" ./tasmota/include/tasmota_version.h
- name: Use different tasmota_configurations.h for C2 BLE
if: "matrix.variant == 'tasmota32c2-mi32' || matrix.variant == 'tasmota32c2-bluetooth'"
run: |
cp -f ./tasmota/include/override_tasmota_configurations.h ./tasmota/include/tasmota_configurations.h
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- uses: jason2866/upload-artifact@v2.0.3
with:
name: special_firmware
path: ./build_output
Start_final_copy:
needs: special
runs-on: ubuntu-latest
steps:
- name: Dispatch workflow in repo Jason2866/Tasmota-specials
run: |
curl -X POST https://api.github.com/repos/Jason2866/Tasmota-specials/actions/workflows/copy_firmware.yml/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.MASTER_ACCESS_TOKEN }} \
--data '{"ref": "copy_firmware"}'