Skip to content

Generate Firmwares #1169

Generate Firmwares

Generate Firmwares #1169

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
# Fix 402 error
- name: remove git-lfs
continue-on-error: true
shell: bash
run: |
sudo rm /etc/apt/sources.list.d/github_git-lfs.list
- 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
ls ~/qmk_firmware
qmk compile -kb wilba_tech/wt60_d -km via
qmk mass-compile -km via -j 4
- name: Copy assets to Repo
run: |
rm -f $GITHUB_WORKSPACE/*.hex
rm -f $GITHUB_WORKSPACE/*.bin
rm -f $GITHUB_WORKSPACE/*.uf2
find ~/qmk_firmware -maxdepth 1 -name "*.hex" -exec \cp '{}' $GITHUB_WORKSPACE \;
find ~/qmk_firmware -maxdepth 1 -name "*.bin" -exec \cp '{}' $GITHUB_WORKSPACE \;
find ~/qmk_firmware -maxdepth 1 -name "*.uf2" -exec \cp '{}' $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
- name: Package assets
run: |
mkdir ~/qmk_firmware/firmware
find ~/qmk_firmware -maxdepth 1 -name "*.hex" -exec mv '{}' ~/qmk_firmware/firmware \;
find ~/qmk_firmware -maxdepth 1 -name "*.bin" -exec mv '{}' ~/qmk_firmware/firmware \;
find ~/qmk_firmware -maxdepth 1 -name "*.uf2" -exec mv '{}' ~/qmk_firmware/firmware \;
- name: Upload firmware artifact
uses: actions/[email protected]
with:
# Artifact name
name: firmware
# A file, directory or wildcard pattern that describes what to upload
path: ~/qmk_firmware/firmware/