Skip to content

Commit 3af2712

Browse files
committed
WIP
1 parent a49018f commit 3af2712

File tree

2 files changed

+25
-60
lines changed

2 files changed

+25
-60
lines changed

.github/workflows/diff.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/production.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Production
22

33
on:
4+
pull_request:
45
workflow_dispatch:
56
pull_request_target:
67
types:
78
- closed
9+
- pull_request
10+
- workflow_dispatch
11+
- push
812

913
jobs:
1014
build:
@@ -19,7 +23,7 @@ jobs:
1923

2024
strategy:
2125
matrix:
22-
device_type: [Watch, Sensor]
26+
device_type: [Watch]
2327
include:
2428
- device_type: Watch
2529
NewImage: 1
@@ -35,7 +39,8 @@ jobs:
3539
run: git clone https://github.com/Kampi/KiCad.git library
3640

3741
- name: Extract branch name
38-
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
42+
run: |
43+
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
3944
4045
- name: Initialize
4146
run: |
@@ -44,10 +49,10 @@ jobs:
4449
4550
- name: Generate files
4651
run: |
47-
cd project
48-
kibot -g variant=${{ matrix.device_type }} -d ../production/${{ matrix.device_type }}
49-
mkdir ../production/${{ matrix.device_type }}/ordering
50-
mv ../production/PCBWay ../production/${{ matrix.device_type }}/ordering/PCBWay
52+
#cd project
53+
#kibot -g variant=${{ matrix.device_type }} -d ../production/${{ matrix.device_type }}
54+
#mkdir ../production/${{ matrix.device_type }}/ordering
55+
#mv ../production/PCBWay ../production/${{ matrix.device_type }}/ordering/PCBWay
5156
5257
- name: Upload Results
5358
uses: actions/upload-artifact@v4
@@ -57,12 +62,18 @@ jobs:
5762
if-no-files-found: ignore
5863

5964
- name: Update image
60-
if: ${{ matrix.NewImage && (github.event.pull_request.merged == true) }}
65+
#if: ${{ matrix.NewImage && (github.event.pull_request.merged == true) }}
6166
run: |
62-
git config --local user.name "github-actions[bot]"
63-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
64-
cp production/${{ matrix.device_type }}/docs/images/PCB_Rendering.png docs/images/Image_Complete.png
65-
git add docs/images/Image_Complete.png
66-
git commit -m "Add image from CI/CD action"
67-
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
68-
git push origin ${{ github.base_ref }}
67+
echo "github.event_name=${{github.event_name}}"
68+
echo "github.base_ref=${{github.base_ref}}"
69+
echo "github.event.pull_request.merged=${{github.event.pull_request.merged}}"
70+
#echo "github.event_name=${github.event_name}" >> $GITHUB_OUTPUT
71+
#echo "github.base_ref=${github.base_ref}" >> $GITHUB_OUTPUT
72+
#echo "github.event.pull_request.merged=${github.event.pull_request.merged}" >> $GITHUB_OUTPUT
73+
#git config --local user.name "github-actions[bot]"
74+
#git config --local user.email "github-actions[bot]@users.noreply.github.com"
75+
#cp production/${{ matrix.device_type }}/docs/images/PCB_Rendering.png docs/images/Image_Complete.png
76+
#git add docs/images/Image_Complete.png
77+
#git commit -m "Add image from CI/CD action"
78+
#git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
79+
#git push origin ${{ github.base_ref }}

0 commit comments

Comments
 (0)