Skip to content

Generate Firmwares #1319

Generate Firmwares

Generate Firmwares #1319

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Generate Firmwares
# Controls when the workflow will run
on:
schedule:
- cron: "0 12 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Fix Git LFS issue
continue-on-error: true
shell: bash
run: |
if [ -f /etc/apt/sources.list.d/github_git-lfs.list ]; then
sudo rm /etc/apt/sources.list.d/github_git-lfs.list
fi
- name: Setup and Build
continue-on-error: true
run: |
export QMK_HOME='~/qmk_firmware'
pip install milc
python3 -m pip install --user qmk
qmk setup -y
git clone https://github.com/the-via/qmk_userspace_via.git
cd qmk_userspace_via
qmk config user.overlay_dir="$(realpath .)"
cd ..
ls ~/qmk_firmware
qmk compile -kb wilba_tech/wt60_d -km via
qmk mass-compile -km via -j 4
- name: Copy firmware assets to repo
run: |
rm -f $GITHUB_WORKSPACE/*.hex $GITHUB_WORKSPACE/*.bin $GITHUB_WORKSPACE/*.uf2
cp ~/qmk_firmware/*.hex $GITHUB_WORKSPACE/
cp ~/qmk_firmware/*.bin $GITHUB_WORKSPACE/
cp ~/qmk_firmware/*.uf2 $GITHUB_WORKSPACE/
ls $GITHUB_WORKSPACE
- name: Set Release Date
run: |
echo "RELEASE_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PAT }}
commit-message: Sync repo to contain VIA Firmware as of ${{ env.RELEASE_DATE }}
title: "[automated-sync] VIA Firmware as of ${{ env.RELEASE_DATE }}"
body: "This PR is auto-generated"
labels: automated-sync
branch: firmware-sync-${{ env.RELEASE_DATE }}
- name: Package and upload firmware artifacts
run: |
mkdir -p ~/qmk_firmware/firmware
cp ~/qmk_firmware/*.hex ~/qmk_firmware/firmware/
cp ~/qmk_firmware/*.bin ~/qmk_firmware/firmware/
cp ~/qmk_firmware/*.uf2 ~/qmk_firmware/firmware/
- name: Upload firmware artifacts
uses: actions/upload-artifact@v4
with:
name: firmware
path: ~/qmk_firmware/firmware/