Tasmota/.github/workflows/Tasmota_build_devel.yml

176 lines
7.8 KiB
YAML
Raw Normal View History

2022-01-18 13:42:26 +00:00
name: Build_development
2021-10-19 12:36:18 +01:00
on:
workflow_dispatch: # Manually start a workflow
push:
2021-11-26 14:42:12 +00:00
branches: development
2021-10-19 12:36:18 +01:00
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory
- '**.md' # Do no build if *.md files changes
2022-01-18 13:42:26 +00:00
# Ensures that only one deploy task per branch/environment will run at a time.
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true
2021-10-19 12:36:18 +01:00
jobs:
2021-12-12 16:09:20 +00:00
base-images:
runs-on: ubuntu-latest
2021-12-12 16:20:16 +00:00
if: github.repository == 'arendst/Tasmota'
2021-12-12 16:09:20 +00:00
continue-on-error: true
strategy:
matrix:
variant:
- tasmota
2022-03-08 10:12:48 +00:00
- tasmota4M
2021-12-12 16:09:20 +00:00
- tasmota-minimal
- tasmota-display
- tasmota-ir
- tasmota-knx
- tasmota-lite
- tasmota-sensors
- tasmota-zbbridge
- tasmota-zigbee
- tasmota32
2022-06-02 19:44:00 +01:00
- tasmota32-zbbrdgpro
2021-12-12 16:09:20 +00:00
- tasmota32-webcam
- tasmota32-bluetooth
2022-06-02 19:44:00 +01:00
- tasmota32-nspanel
2021-12-12 16:09:20 +00:00
- tasmota32-display
- tasmota32-ir
- tasmota32-lvgl
- tasmota32c3
2022-06-07 15:37:10 +01:00
- tasmota32c3cdc
2022-05-21 14:14:17 +01:00
- tasmota32s2
2022-06-07 15:37:10 +01:00
- tasmota32s2cdc
2022-05-21 14:14:17 +01:00
- tasmota32s3
2022-06-07 15:37:10 +01:00
- tasmota32s3cdc
2021-12-12 16:09:20 +00:00
- tasmota32solo1
- tasmota32solo1-safeboot
- tasmota32-safeboot
- tasmota32c3-safeboot
2022-06-07 15:37:10 +01:00
- tasmota32c3cdc-safeboot
- tasmota32s2-safeboot
2022-06-07 15:37:10 +01:00
- tasmota32s2cdc-safeboot
- tasmota32s3-safeboot
2022-06-07 15:37:10 +01:00
- tasmota32s3cdc-safeboot
2021-12-12 16:09:20 +00:00
steps:
2022-05-05 17:24:12 +01:00
- uses: actions/checkout@v3
2021-12-12 22:34:56 +00:00
with:
ref: development
2021-12-12 16:09:20 +00:00
- name: Set up Python
2022-05-05 17:24:12 +01:00
uses: actions/setup-python@v2
2021-12-12 16:09:20 +00:00
- name: Install dependencies
run: |
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- uses: actions/upload-artifact@v2
with:
name: firmware
path: ./build_output
language-images:
runs-on: ubuntu-latest
2021-12-12 16:20:16 +00:00
if: github.repository == 'arendst/Tasmota'
2021-12-12 16:09:20 +00:00
continue-on-error: true
strategy:
matrix:
variant: [ tasmota, tasmota32 ]
2022-08-03 21:35:07 +01:00
language: [ AF, BG, BR, CA, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
2021-12-12 16:09:20 +00:00
steps:
2022-05-05 17:24:12 +01:00
- uses: actions/checkout@v3
2021-12-12 22:34:56 +00:00
with:
ref: development
2021-12-12 16:09:20 +00:00
- name: Set up Python
2022-05-05 17:24:12 +01:00
uses: actions/setup-python@v2
2021-12-12 16:09:20 +00:00
- name: Install dependencies
run: |
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
- uses: actions/upload-artifact@v2
with:
name: firmware
path: ./build_output
2021-10-19 12:36:18 +01:00
Upload:
2021-12-12 16:09:20 +00:00
needs: [base-images, language-images]
2021-10-19 12:36:18 +01:00
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/download-artifact@v2
with:
name: firmware
path: ./mv_firmware
- name: Display structure of downloaded files
run: ls -R
working-directory: ./mv_firmware
- name: Move firmware files in sub-folders
run: |
mkdir -p ./firmware/tasmota/languages
mkdir -p ./firmware/tasmota32/languages
mkdir -p ./firmware/map
[ ! -f ./mv_firmware/map/* ] || mv ./mv_firmware/map/* ./firmware/map/
[ ! -f ./mv_firmware/firmware/tasmota.* ] || mv ./mv_firmware/firmware/tasmota.* ./firmware/tasmota/
2022-03-09 10:03:21 +00:00
[ ! -f ./mv_firmware/firmware/tasmota4M.* ] || mv ./mv_firmware/firmware/tasmota4M.* ./firmware/tasmota/
2021-10-19 12:36:18 +01:00
[ ! -f ./mv_firmware/firmware/tasmota-sensors.* ] || mv ./mv_firmware/firmware/tasmota-sensors.* ./firmware/tasmota/
2021-12-21 10:52:37 +00:00
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin.gz ] || mv ./mv_firmware/firmware/tasmota-minimal.bin.gz ./firmware/tasmota/
2021-10-19 12:36:18 +01:00
[ ! -f ./mv_firmware/firmware/tasmota-lite.* ] || mv ./mv_firmware/firmware/tasmota-lite.* ./firmware/tasmota/
[ ! -f ./mv_firmware/firmware/tasmota-ir*.* ] || mv ./mv_firmware/firmware/tasmota-ir*.* ./firmware/tasmota/
[ ! -f ./mv_firmware/firmware/tasmota-display.* ] || mv ./mv_firmware/firmware/tasmota-display.* ./firmware/tasmota/
[ ! -f ./mv_firmware/firmware/tasmota-knx.* ] || mv ./mv_firmware/firmware/tasmota-knx.* ./firmware/tasmota/
[ ! -f ./mv_firmware/firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/firmware/tasmota-zbbridge.* ./firmware/tasmota/
[ ! -f ./mv_firmware/firmware/tasmota-zigbee.* ] || mv ./mv_firmware/firmware/tasmota-zigbee.* ./firmware/tasmota/
[ ! -f ./mv_firmware/firmware/tasmota32.* ] || mv ./mv_firmware/firmware/tasmota32.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32solo1*.* ] || mv ./mv_firmware/firmware/tasmota32solo1*.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-ir*.* ] || mv ./mv_firmware/firmware/tasmota32-ir*.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-display.* ] || mv ./mv_firmware/firmware/tasmota32-display.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-lvgl.* ] || mv ./mv_firmware/firmware/tasmota32-lvgl.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-web*.* ] || mv ./mv_firmware/firmware/tasmota32-web*.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/firmware/tasmota32-odroidgo.* ./firmware/tasmota32/
2022-06-02 19:44:00 +01:00
[ ! -f ./mv_firmware/firmware/tasmota32-zbbrdgpro.* ] || mv ./mv_firmware/firmware/tasmota32-zbbrdgpro.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-nspanel.* ] || mv ./mv_firmware/firmware/tasmota32-nspanel.* ./firmware/tasmota32/
2021-10-19 12:36:18 +01:00
[ ! -f ./mv_firmware/firmware/tasmota32-core2.* ] || mv ./mv_firmware/firmware/tasmota32-core2.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-bluetooth.* ] || mv ./mv_firmware/firmware/tasmota32-bluetooth.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32c3*.* ] || mv ./mv_firmware/firmware/tasmota32c3*.* ./firmware/tasmota32/
2022-05-21 14:14:17 +01:00
[ ! -f ./mv_firmware/firmware/tasmota32s2*.* ] || mv ./mv_firmware/firmware/tasmota32s2*.* ./firmware/tasmota32/
2022-05-21 13:10:25 +01:00
[ ! -f ./mv_firmware/firmware/tasmota32s3*.* ] || mv ./mv_firmware/firmware/tasmota32s3*.* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-safeboot* ] || mv ./mv_firmware/firmware/tasmota32-safeboot* ./firmware/tasmota32/
[ ! -f ./mv_firmware/firmware/tasmota32-* ] || mv ./mv_firmware/firmware/tasmota32-* ./firmware/tasmota32/languages/
[ ! -f ./mv_firmware/firmware/tasmota32* ] || mv ./mv_firmware/firmware/tasmota32* ./firmware/tasmota32/
2022-06-11 07:56:56 +01:00
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin ] || rm -rf ./mv_firmware/firmware/tasmota-minimal.bin
2021-10-19 12:36:18 +01:00
[ ! -f ./mv_firmware/firmware/* ] || mv ./mv_firmware/firmware/* ./firmware/tasmota/languages/
- name: Display files to transfer
run: ls -R ./*
2021-11-25 14:47:09 +00:00
- name: Push Firmware files to tmp_copy repo
2021-11-25 14:00:33 +00:00
uses: Jason2866/copy_file_to_another_repo_action@main
env:
2021-11-26 13:57:29 +00:00
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
2021-11-25 14:00:33 +00:00
with:
source_file: 'firmware'
destination_repo: 'arendst/tmp_copy'
destination_branch: 'firmware'
user_email: 'github-actions@github.com'
user_name: 'github-actions'
2021-10-19 12:36:18 +01:00
2021-11-25 14:00:33 +00:00
Start_final_copy:
needs: Upload
runs-on: ubuntu-latest
steps:
2022-05-05 17:24:12 +01:00
- uses: actions/checkout@v3
2021-10-19 12:36:18 +01:00
- name: Creat trigger.txt
run: |
echo ${GITHUB_SHA} &> trigger.txt
echo "$(<trigger.txt)"
2021-11-25 14:00:33 +00:00
- name: Push trigger.txt to start workflow copy in tmp repo
2021-10-19 12:36:18 +01:00
uses: Jason2866/copy_file_to_another_repo_action@main
env:
2021-11-26 13:57:29 +00:00
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
2021-10-19 12:36:18 +01:00
with:
source_file: 'trigger.txt'
2021-11-25 14:15:56 +00:00
destination_repo: 'arendst/tmp_copy'
destination_branch: 'action-development'
2021-10-19 12:36:18 +01:00
user_email: 'github-actions@github.com'
user_name: 'github-actions'