A repository for demonstrating the "DigiKey Search HTML Report" AllSpice Actions add-on.
Go to file
Gautam Peri f03bad89dc
All checks were successful
Generate DigiKey Report / Generate_DigiKey_Report (push) Successful in 55s
Merge pull request 'Update .allspice/columns.yml' (#9) from develop into main
Reviewed-on: #9
2024-09-03 15:30:21 +00:00
.allspice Update .allspice/workflows/Digikey-Search-HTML-Report.yml 2024-09-03 15:29:05 +00:00
images README update. 2024-07-15 09:21:20 -07:00
.gitignore Initial commit 2024-07-15 15:15:57 +00:00
Archim.OutJob Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Archimajor.csv Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Archimajor.PcbDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Archimajor.PrjPcb Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Archimajor.RUL Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Archimajor.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
cern_ohl_v_1_2.md Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Connectors.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
EndStops.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Fans.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Microcontroller.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Mosfets.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Motors.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Power.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
README.md Replace image reference with correct aspect ratio 2024-07-31 18:04:06 -05:00
Thermistors.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
Thermocouples.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00
USB.SchDoc Baseline commit of design files. 2024-07-15 08:44:01 -07:00

DigiKey-Search-HTML-Report AllSpice Actions Demo

This is repository with an Altium-based design for demonstrating the "DigiKey Search HTML Report" AllSpice Actions add-on.

This action uses the generate-bom and digikey-search-html-report Actions add-ons publically available in the AllSpice Hub Actions organization.

As shown and explained below in the YML workflow file, the generate-bom add-on is used to generate a BOM using the py-allspice BOM generation utility function, and the digikey-search-html-report add-on is used to search DigiKey for BOM line items using the DigiKey API. See the DigiKey API docs for more information.

Usage

Step 1) Add the DIGIKEY_CLIENT_ID and DIGIKEY_CLIENT_SECRET secrets to your repository.

This add-on requires the DigiKey client ID and client secret to be stored as Actions secrets. Refer to the knowledge base article on Actions secrets to learn how to add the required secrets to your repository.

Repository Secrets

Step 2) Add the following step to your actions:

name: Generate DigiKey Report
on:
  push:
  issues:
    types: [opened, closed, reopened]

jobs:
  Generate_DigiKey_Report:
    runs-on: ubuntu-latest
    steps:
      # Checkout is only needed if columns.json is committed in your Altium project repo.
      - name: Checkout
        uses: actions/checkout@v3

      - name: Generate BOM
        uses: https://hub.allspice.io/Actions/generate-bom@v0.3
        with:
          # The path to the project file in your repo (.PrjPcb for Altium, .DSN for OrCad).
          source_path: Archimajor.PrjPcb
          # [optional] A path to a JSON file mapping columns to the component attributes
          # they are from. This file must be provided.
          # Default: 'columns.json'
          columns: .allspice/columns.json
          # [optional] The path to the output file that will be generated.
          # Default: 'bom.csv'
          output_file_name: bom.csv
          # [optional] A comma-separated list of columns to group the BOM by. If empty
          # or not present, the BOM will be flat.
          # Default: ''
          group_by: "Part Number"
          # [optional] The variant of the project to generate the BOM for. If empty
          # or not present, the BOM will be generated for the default variant.
          # Default: ''
          variant: ""

      # Print bom.csv to terminal
      - name: Show BOM
        run: cat bom.csv

      # Upload BOM as artifact
      - name: Upload file as artifact
        uses: actions/upload-artifact@v3
        with:
          name: BOM.csv
          path: bom.csv

      - name: Generate DigiKey Report
        uses: https://hub.allspice.io/Actions/digikey-search-html-report.git@v1
        with:
          # The input BOM file for generating the DigiKey report
          bom_file: bom.csv
          # The DigiKey client ID
          digikey_client_id: ${{ secrets.DIGIKEY_CLIENT_ID }}
          # The DigiKey client secret
          digikey_client_secret: ${{ secrets.DIGIKEY_CLIENT_SECRET }}

      # Upload component report as artifact
      - name: Upload component report as artifact
        uses: actions/upload-artifact@v3
        with:
          name: DigiKey_Component_Report.zip
          path: component_report.zip

Refer to the generate-bom and digikey-search-html-report add-on pages for usage and background on the add-ons used in this workflow demonstration.