Skip to content

Commit

Permalink
ci: Fix rendered image.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkra committed Dec 8, 2024
1 parent 1acb3d9 commit a06915c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
with:
name: "diff-schematics-${{ github.ref_name }}"
path: diff-schematics
if-no-files-found: ignore
if-no-files-found: ignore
18 changes: 8 additions & 10 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
permissions:
contents: write

env:
KICAD_LIBRARY: /home/runner/work/ZSWatch-HW/ZSWatch-HW/library

strategy:
matrix:
device_type: [Watch, Sensor]
Expand All @@ -32,11 +29,10 @@ jobs:
path: .
submodules: recursive

- name: Dependencies
run: git clone https://github.com/Kampi/KiCad.git library

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Initialize
run: |
Expand All @@ -54,16 +50,18 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.device_type }}
path: production
path: |
production
if-no-files-found: ignore

- name: Update image
if: ${{ matrix.NewImage && (github.event.pull_request.merged == true) }}
- if: ${{ matrix.NewImage && (github.event.pull_request.merged == true) }}
name: Update image
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
cp production/${{ matrix.device_type }}/docs/images/PCB_Rendering.png docs/images/Image_Complete.png
git add docs/images/Image_Complete.png
git commit -m "Add image from CI/CD action"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push origin ${{ github.base_ref }}
echo https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push origin ${{ github.base_ref }}

0 comments on commit a06915c

Please sign in to comment.