This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tasmota CI (Kettle Companion) | |
on: | |
push: | |
branches: | |
- kettlecompanion | |
- kettlecompanion-prod | |
pull_request: | |
branches: | |
- kettlecompanion | |
- kettlecompanion-prod | |
# release: | |
# types: published | |
jobs: | |
tasmota-minimal: | |
runs-on: ubuntu-latest | |
# runs-on: [self-hosted, linux] | |
environment: | |
name: build | |
env: | |
PLATFORMIO_BUILD_FLAGS: -D MQTT_CLIENT_ID='"${{ secrets.MQTT_CLIENT_ID }}"' -D MQTT_USER='"${{ secrets.MQTT_USER }}"' -D MQTT_PASS='"${{ secrets.MQTT_PASS }}"' | |
steps: | |
- name: Set environment for branch | |
run: | | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion' ]]; then | |
echo "BUILD_TYPE=devel" >> "$GITHUB_ENV" | |
fi | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion-prod' ]]; then | |
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV" | |
fi | |
- name: Checkout | |
uses: actions/checkout@v1 | |
# - name: Set up Python | |
# uses: actions/setup-python@v1 | |
- name: Install dependencies | |
run: | | |
sudo apt install python3-pip | |
python -m pip install --upgrade pip | |
pip install -U platformio | |
platformio upgrade --dev | |
platformio update | |
- name: Run PlatformIO | |
run: | | |
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}" | |
platformio run -e tasmota-minimal | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-minimal-${{ github.sha }} | |
path: ./build_output/firmware | |
- name: Deploy Development (if 'kettlecompanion' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: devel | |
clean: false | |
- name: Deploy Production (if 'kettlecompanion-prod' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion-prod' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: prod | |
clean: false | |
tasmota-minimal-trampoline: | |
runs-on: ubuntu-latest | |
# runs-on: [self-hosted, linux] | |
environment: | |
name: build | |
env: | |
PLATFORMIO_BUILD_FLAGS: -D MQTT_CLIENT_ID='"${{ secrets.MQTT_CLIENT_ID }}"' -D MQTT_USER='"${{ secrets.MQTT_USER }}"' -D MQTT_PASS='"${{ secrets.MQTT_PASS }}"' | |
needs: tasmota-minimal | |
steps: | |
- name: Set environment for branch | |
run: | | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion' ]]; then | |
echo "BUILD_TYPE=devel" >> "$GITHUB_ENV" | |
fi | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion-prod' ]]; then | |
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV" | |
fi | |
- name: Checkout | |
uses: actions/checkout@v1 | |
# - name: Set up Python | |
# uses: actions/setup-python@v1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U platformio | |
platformio upgrade --dev | |
platformio update | |
- name: Run PlatformIO | |
run: | | |
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}" | |
platformio run -e tasmota-minimal-trampoline | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-minimal-trampoline-${{ github.sha }} | |
path: ./build_output/firmware | |
- name: Deploy Development (if 'kettlecompanion' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: devel | |
clean: false | |
- name: Deploy Production (if 'kettlecompanion-prod' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion-prod' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: prod | |
clean: false | |
tasmota-lite: | |
runs-on: ubuntu-latest | |
# runs-on: [self-hosted, linux] | |
needs: tasmota-minimal-trampoline | |
environment: | |
name: build | |
env: | |
PLATFORMIO_BUILD_FLAGS: -D MQTT_CLIENT_ID='"${{ secrets.MQTT_CLIENT_ID }}"' -D MQTT_USER='"${{ secrets.MQTT_USER }}"' -D MQTT_PASS='"${{ secrets.MQTT_PASS }}"' | |
steps: | |
- name: Set environment for branch | |
run: | | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion' ]]; then | |
echo "BUILD_TYPE=devel" >> "$GITHUB_ENV" | |
fi | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion-prod' ]]; then | |
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV" | |
fi | |
- name: Checkout | |
uses: actions/checkout@v1 | |
# - name: Set up Python | |
# uses: actions/setup-python@v1 | |
- name: Install dependencies | |
run: | | |
sudo apt install python3-pip | |
python -m pip install --upgrade pip | |
pip install -U platformio | |
platformio upgrade --dev | |
platformio update | |
- name: Run PlatformIO | |
run: | | |
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}" | |
platformio run -e tasmota-lite | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-lite-${{ github.sha }} | |
path: ./build_output/firmware | |
- name: Deploy Development (if 'kettlecompanion' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: devel | |
clean: false | |
- name: Deploy Production (if 'kettlecompanion-prod' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion-prod' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: prod | |
clean: false | |
tasmota-lite-trampoline: | |
runs-on: ubuntu-latest | |
# runs-on: [self-hosted, linux] | |
environment: | |
name: build | |
env: | |
PLATFORMIO_BUILD_FLAGS: -D MQTT_CLIENT_ID='"${{ secrets.MQTT_CLIENT_ID }}"' -D MQTT_USER='"${{ secrets.MQTT_USER }}"' -D MQTT_PASS='"${{ secrets.MQTT_PASS }}"' | |
needs: tasmota-lite | |
steps: | |
- name: Set environment for branch | |
run: | | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion' ]]; then | |
echo "BUILD_TYPE=devel" >> "$GITHUB_ENV" | |
fi | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion-prod' ]]; then | |
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV" | |
fi | |
- name: Checkout | |
uses: actions/checkout@v1 | |
# - name: Set up Python | |
# uses: actions/setup-python@v1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U platformio | |
platformio upgrade --dev | |
platformio update | |
- name: Run PlatformIO | |
run: | | |
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}" | |
platformio run -e tasmota-lite-trampoline | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-lite-trampoline-${{ github.sha }} | |
path: ./build_output/firmware | |
- name: Deploy Development (if 'kettlecompanion' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: devel | |
clean: false | |
- name: Deploy Production (if 'kettlecompanion-prod' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion-prod' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: prod | |
clean: false | |
tasmota: | |
runs-on: ubuntu-latest | |
# runs-on: [self-hosted, linux] | |
environment: | |
name: build | |
env: | |
PLATFORMIO_BUILD_FLAGS: -D MQTT_CLIENT_ID='"${{ secrets.MQTT_CLIENT_ID }}"' -D MQTT_USER='"${{ secrets.MQTT_USER }}"' -D MQTT_PASS='"${{ secrets.MQTT_PASS }}"' | |
needs: tasmota-lite-trampoline | |
steps: | |
- name: Set environment for branch | |
run: | | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion' ]]; then | |
echo "BUILD_TYPE=develop" >> "$GITHUB_ENV" | |
fi | |
if [[ $GITHUB_REF == 'refs/heads/kettlecompanion-prod' ]]; then | |
echo "BUILD_TYPE=prod" >> "$GITHUB_ENV" | |
fi | |
- name: Checkout | |
uses: actions/checkout@v1 | |
# - name: Set up Python | |
# uses: actions/setup-python@v1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U platformio | |
platformio upgrade --dev | |
platformio update | |
- name: Run PlatformIO | |
run: | | |
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -D BUILD_TYPE=${BUILD_TYPE}" | |
platformio run -e tasmota | |
- name: Store artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-${{ github.sha }} | |
path: ./build_output/firmware | |
- name: Deploy Development (if 'kettlecompanion' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: devel | |
clean: false | |
- name: Deploy Production (if 'kettlecompanion-prod' branch) | |
if: ${{ github.ref == 'refs/heads/kettlecompanion-prod' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build_output/firmware # The folder the action should deploy. | |
target-folder: prod | |
clean: false |