Skip to content

Build Marlin Firmware ET4000PLUS-K9 #17

Build Marlin Firmware ET4000PLUS-K9

Build Marlin Firmware ET4000PLUS-K9 #17

Workflow file for this run

# This a Github Action for automatically building Marlin Firmware when you push a commit to master.
name: Build Marlin Firmware
on:
#push:
workflow_dispatch:
branches:
- main
paths:
- 'Firmware/Configuration/**.h'
- '.github/workflows/github-action.yml'
jobs:
build_and_push:
name: Build and push firmware
runs-on: ubuntu-latest
env:
BOARD: mks_robin_lite_maple
USE_REPO: https://github.com/schmttc/EasyThreeD-K7-STM32
USE_BRANCH: ET4000PLUS-K9
#USE_BRANCH: bugfix-2.0.x
#USE_TAG: 2.0.9.3
REGISTRY: ghcr.io
steps:
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository }}/${{ github.event.repository.name }}"
TAGS="${IMAGE}:${{ github.sha }}"
if [[ $GITHUB_REF == ref/head/master ]]; then
TAGS="${TAGS},${IMAGE}:latest"
fi
echo ::set-output name=tags::${TAGS}
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: false
- name: Check out repo
uses: actions/checkout@v2
- name: Pull docker image
run: |
docker pull ghcr.io/schmttc/marlin-build:working
- name: Compile firmware
run: |
docker run \
-u root:root \
-e BOARD \
-e USE_REPO \
-v $(pwd)/Firmware/Builds:/home/platformio/build \
-v $(pwd)/Firmware/Configuration:/home/platformio/CustomConfiguration \
ghcr.io/schmttc/marlin-build:working
- name: Push firmware
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Compiled firmware"
git push