Skip to content

Validate Package Workflow #4

Validate Package Workflow

Validate Package Workflow #4

name: Package Upload Workflow
on:
# This workflow can be triggered manually from the GitHub UI
workflow_dispatch:
jobs:
upload-package:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Upload package as artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: hatch-package
path: arithmetic_pkg/
retention-days: 1
if-no-files-found: error
- name: Generate GitHub App token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.HATCH_WORKFLOW_APP_ID }}
private_key: ${{ secrets.HATCH_WORKFLOW_APP_PRIVATE_KEY }}
- name: Trigger Validation Package Workflow in Registry
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.generate-token.outputs.token }}
repository: CrackingShells/Hatch-Registry
event-type: validate-package
client-payload: |-
{
"run_id": "${{ github.run_id }}",
"workflow_id": "${{ github.workflow }}",
"repository": "${{ github.repository }}",
"artifact_name": "hatch-package",
"package_name": "${{ github.event.inputs.package_path }}"
}