Skip to content

Commit

Permalink
Update production.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kampi authored Jan 3, 2025
1 parent 63dbba8 commit b7b9502
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Production

on:
pull_request:
workflow_dispatch:
pull_request:
pull_request_target:
types:
- closed
Expand All @@ -29,29 +29,48 @@ jobs:
path: .
submodules: recursive

- name: Cache KiCost data
uses: actions/cache@v3
with:
path: ~/kicost_cache
key: kicost_cache

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

- name: Initialize
run: |
mkdir -p log
mkdir -p docs/images/
mkdir -p production

- name: Generate files
run: |
cd project
kibot -g variant=${{ matrix.device_type }} -d ../production/${{ matrix.device_type }}
kibot -vvvv -g variant=${{ matrix.device_type }} -d ../production/${{ matrix.device_type }} 2> ../log/kibot.log
mkdir ../production/${{ matrix.device_type }}/ordering
mv ../production/PCBWay ../production/${{ matrix.device_type }}/ordering/PCBWay

- name: Clean up
run: |
cd production/${{ matrix.device_type }}
find . -type f -iname \*.log -delete
find . -type f -iname \*.ogv -delete

- name: Upload logs
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Log-${{ matrix.device_type }}
path: log

- name: Upload Results
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.device_type }}
path: |
production
path: production
if-no-files-found: ignore

- if: ${{ matrix.NewImage && (github.event.pull_request.merged == true) }}
Expand Down

0 comments on commit b7b9502

Please sign in to comment.