Replace ${{github.var}} with $ {{allspice.var}}

This commit is contained in:
Daniel Lindmark 2024-05-24 12:05:59 -05:00
parent 2cb65481c9
commit 4b946d5452
3 changed files with 55 additions and 7 deletions

View File

@ -18,7 +18,7 @@ jobs:
- name: "[🔎->📂] List files in repo 🔎"
run: |
ls -la ${{ github.workspace }}
ls -la ${{ allspice.workspace }}
# Installs python requirements from the requirements.txt file
- name: "[🤼->🖥️] Install python requirements"
@ -29,16 +29,16 @@ jobs:
run: python .allspice/utils/hello-world.py
# Run the py-allspice self-test script, this will ping the server and verify the API is working
# Parameters: ${github.server_url} and ${github.token} are automatic Workflow variables and are used to authenticate the AllSpice API
# Parameters: ${allsice.server_url} and ${allspice.token} are automatic Workflow variables and are used to authenticate the AllSpice API
- name: "[🔑->🕸️] Test AllSpice API with py-allspice 🔎"
run: python .allspice/utils/py-allspice-BIST.py --allspice_hub_url ${{ github.server_url }} --allspice_token ${{ github.token }}
run: python .allspice/utils/py-allspice-BIST.py --allspice_hub_url ${{ allsice.server_url }} --allspice_token ${{ allsice.token }}
# Generate a netlist from Altium .PcbDoc file
# Run the generate_netlist.py script from the .allspice/utils directory
- name: Generate Netlist
run: |
echo -e "repo ${{ github.repository }}"
ALLSPICE_AUTH_TOKEN=${{ github.token }} python .allspice/utils/generate_netlist.py "${{ github.repository }}" "Archimajor.PcbDoc" --allspice_hub_url "${{ github.server_url }}" --output_file Archimajor.pcbdoc.netlist.txt
echo -e "repo ${{ allsice.repository }}"
ALLSPICE_AUTH_TOKEN=${{ allsice.token }} python .allspice/utils/generate_netlist.py "${{ allsice.repository }}" "Archimajor.PcbDoc" --allspice_hub_url "${{ allsice.server_url }}" --output_file Archimajor.pcbdoc.netlist.txt
# Print the netlist file to the terminal

View File

@ -19,7 +19,7 @@ jobs:
- name: Print repository Action variable 🔎
run: |
echo "Repository variable VARIABLE_NAME = ${{ vars.VARIABLE_NAME }}"
echo "Repository variables are stored in ${{ github.server_url }}/${{ github.repository }}/settings/actions/variables"
echo "Repository variables are stored in ${{ allspice.server_url }}/${{ allspice.repository }}/settings/actions/variables"
- name: Use Secret 🔎
# Store the secret in an environment variable YOUR_SECRET
@ -28,7 +28,7 @@ jobs:
# Demonstrate how to use secrets in the workflow
run: |
echo "Secrets are stored in ${{ github.server_url }}/${{ github.repository }}"/settings/actions/secrets
echo "Secrets are stored in ${{ allspice.server_url }}/${{ allspice.repository }}"/settings/actions/secrets
echo "Secrets are only available to the repository admins and the workflow"
echo "Store API Tokens in secrets and use them in the workflow without exposing them"
echo "Secrets are not printed to the terminal for security reasons and will be replaced with ***"

View File

@ -0,0 +1,48 @@
# Py-allspice documentation workflow
# py-allspice https://github.com/AllSpiceIO/py-allspice
# AllSpice Actions documentation: https://learn.allspice.io/docs/actions-cicd
name: Py-allspice documentation
on:
push:
issues:
types: [opened, closed, reopened]
jobs:
Py-allspice documentation:
runs-on: ubuntu-latest
steps:
- name: Get repository owner
id: get_owner
run: echo "::set-output name=owner::$(echo ${{ allspice.repository }} | cut -d'/' -f1)"
- name: Get repository name
id: get_repo
run: echo "::set-output name=repo::$(echo ${{ allspice.repository }} | cut -d'/' -f2)"
# Check out repository code
- name: "[📚->🖥️] Check out repository code"
uses: actions/checkout@v3
# Installs python requirements from the requirements.txt file
- name: "[🤼->🖥️] Install python requirements"
run: pip install -r .allspice/utils/requirements.txt
# Run the py-allspice self-test script, this will ping the server and verify the API is working
# Parameters: ${allspice.server_url} and ${allspice.token} are automatic Workflow variables and are used to authenticate the AllSpice API
- name: "[🔑->🕸️] Run py-allspice-documentation.py"
run: python .allspice/utils/py-allspice-documentation.py --allspice_hub_url ${{ allspice.server_url }} --allspice_token ${{ allspice.token }}
# Print the documentation file to the terminal
- name: Show repository attributes 🔎
run: cat repo_attributes.json
# Archive the netlist file as an artifact file
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: repo_attributes.json
path: repo_attributes.json