Skip to content

fix: add test points #10

fix: add test points

fix: add test points #10

Workflow file for this run

on:
push:
branches:
- main
paths:
- '**.kicad_sch'
- '**.kicad_pcb'
name: KiCad Date Update
jobs:
get-changed-files:
name: Get changed files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed PCB files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
**/*.kicad_pcb
**/*.kicad_sch
matrix: true
outputs:
any-changed: ${{ steps.changed-files.outputs.any_changed }}
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
update:
if: ${{ fromJson(needs.get-changed-files.outputs.any-changed) }}
needs: get-changed-files
name: Update KiCad dates
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{ fromJSON(needs.get-changed-files.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Update KiCad file dates
run: |
TODAY=$(date +%F)
sed -i "s/(date \".*\"/(date \"$TODAY\"/" ${{ matrix.file }}
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actor
message: "chore: update KiCad dates"