Take Auth Token as an input

This commit is contained in:
Shrikanth Upadhayaya 2024-09-12 12:10:21 -04:00
parent 6c41088f51
commit 38743b429f
No known key found for this signature in database
2 changed files with 17 additions and 2 deletions

View File

@ -12,6 +12,8 @@ Add the following step to your actions:
```yaml
- name: Generate WireViz Template
uses: https://hub.allspice.io/Actions/generate-wireviz-template@v0.1
with:
allspice_auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}
```
### Important Notes
@ -21,6 +23,9 @@ Add the following step to your actions:
connections between the boards, and use the wireviz tool to generate a
visualization.
- You do not need to check out the repository for this action to work.
- An AllSpice API token is required to access the assembly configuration. You
can generate a token in your AllSpice account settings and add it as a secret
in your repository.
### Customizing the Template Generation
@ -37,6 +42,7 @@ Example with custom inputs:
- name: Generate WireViz Template
uses: https://hub.allspice.io/Actions/generate-wireviz-template@v0.1
with:
allspice_auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}
assembly_file_path: configs/my_assembly.yaml
variant: Double
output_file: my_wireviz_template.yaml
@ -52,7 +58,10 @@ verbose logging:
- name: Generate WireViz Template
uses: https://hub.allspice.io/Actions/generate-wireviz-template@v0.1
with:
allspice_auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}
log_level: DEBUG
```
For more information about AllSpice Actions and how to use them in your workflows, please refer to the [AllSpice Documentation](https://learn.allspice.io/docs/actions-cicd).
For more information about AllSpice Actions and how to use them in your
workflows, please refer to the
[AllSpice Documentation](https://learn.allspice.io/docs/actions-cicd).

View File

@ -5,7 +5,13 @@ description: >
The template file includes all the connectors and their pins, but does NOT
include any wires or connections.
Requires an AllSpice Hub Auth Token, as the default token does not have
permissions to read other repositories.
inputs:
allspice_auth_token:
description: The auth token for the AllSpice Hub instance.
required: true
assembly_file_path:
description: The path to the assembly YAML file.
required: false
@ -42,4 +48,4 @@ runs:
- "--log-level"
- ${{ inputs.log_level }}
env:
ALLSPICE_AUTH_TOKEN: ${{ github.token }}
ALLSPICE_AUTH_TOKEN: ${{ inputs.allspice_auth_token }}