Skip to content

Commit

Permalink
Change to reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy4495 committed Aug 31, 2023
1 parent 5357f0e commit 2fe3e7d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 42 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/CheckMarkdownLinks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ on:
# Modify the cron time to a somewhat random day/time to avoid having all your repos running at the same time
# Run 4th day of every month at 4:41 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
- cron: "37 4 4 * *"
workflow_dispatch:
inputs:
message:
description: Message to display in job summary
required: false
type: string

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
base-branch: main
use-verbose-mode: yes
name: call-markdown-link-check-workflow
uses: Andy4495/.github/.github/workflows/CheckMarkdownLinks.yml@main
with:
message: ${{ inputs.message }}

48 changes: 13 additions & 35 deletions .github/workflows/arduino-compile-sketches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,16 @@ jobs:
platform-name: 'energia:msp430'
platform-sourceurl: 'https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_minimal_MSP_107_index.json'

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Clone compile-sketches to get python version (using nektos/act locally)
if: ${{ env.ACT }}
run: cd /tmp; git clone 'https://github.com/arduino/compile-sketches'
- name: setup-python (when running locally for nektos/act compatibility)
if: ${{ env.ACT }}
uses: actions/setup-python@v4
with:
python-version-file: /tmp/compile-sketches/.python-version
- name: Install Poetry (when running locally for nektos/act compatibility)
if: ${{ env.ACT }}
uses: snok/install-poetry@v1
- name: Install pipx (when running locally for nektos/act compatibility)
if: ${{ env.ACT }}
run: pip install pipx
- uses: arduino/compile-sketches@v1
with:
fqbn: ${{ matrix.fqbn }}
platforms: |
- name: ${{ matrix.platform-name }}
version: latest
source-url: ${{ matrix.platform-sourceurl }}
sketch-paths: |
- .
verbose: true
enable-warnings-report: true
libraries: |
- source-path: ./
- source-url: https://github.com/Andy4495/SWI2C.git
- name: Print the job summary
if: ${{ inputs.message }}
run: |
echo ${{ inputs.message }} >$GITHUB_STEP_SUMMARY
name: call-compile-sketches-workflow
uses: Andy4495/.github/.github/workflows/arduino-compile-sketches.yml@main
with:
message: ${{ inputs.message }}
copyfile:
fqbn: ${{ matrix.fqbn }}
platform-name: ${{ matrix.platform-name }}
platform-sourceurl: ${{ matrix.platform-sourceurl }}
platform-version: latest
libraries: |
- source-path: ./
- source-url: https://github.com/Andy4495/SWI2C.git

0 comments on commit 2fe3e7d

Please sign in to comment.