Add tree/GITHUB_REF to yml file so Compile Sketch runs on the current branch, not main

This commit is contained in:
PaulZC
2021-12-02 10:15:08 +00:00
parent 9c52398855
commit 1b7ba984c3
+5 -2
View File
@@ -1,7 +1,7 @@
name: Compile Sketch name: Compile Sketch
on: on:
# - push - push
- pull_request - pull_request
@@ -88,13 +88,16 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}
- name: Compile Sketch - name: Compile Sketch
uses: arduino/compile-sketches@v1 uses: arduino/compile-sketches@v1
with: with:
platforms: ${{ matrix.board.platforms }} platforms: ${{ matrix.board.platforms }}
fqbn: ${{ matrix.board.fqbn }} fqbn: ${{ matrix.board.fqbn }}
libraries: | libraries: |
- source-url: https://github.com/${{github.repository}}.git - source-url: https://github.com/${{github.repository}}/tree/${GITHUB_REF##*/}.git
sketch-paths: | sketch-paths: |
- examples/Example10_AltitudeMSL - examples/Example10_AltitudeMSL
- examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C - examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C