Hello
im using github to upload script and i have no errors but this opcion push to the DMS and is not published in the catalog as private item,
- name: Upload to Catalog
id: uploadToCatalog
run: echo "id=$(dataminer-catalog-upload --path-to-artifact "${{ github.workspace }}/${{ steps.packageName.outputs.name }}.dmapp" --dm-catalog-token ${{ secrets.DATAMINER_DEPLOY_KEY }})" >> $GITHUB_OUTPUT
- name: Deploy to DataMiner
run: dataminer-package-deploy from-volatile --artifact-id "${{ steps.uploadToCatalog.outputs.id }}" --dm-system-token ${{ secrets.DATAMINER_DEPLOY_KEY }}
how can i uploadToCatalog and maked as private element to my organization?
Thabks
Hello Juan,
The easiest way is to use our reusable workflow that we actually also use in all our internal work, which handles everything directly.
(Unit testing, Building, Upload to catalog, ...)
You can access it with a workflow as followed:
https://github.com/SkylineCommunications/.github/blob/main/workflow-templates/MasterWorkflow.yml
There are many inputs you can provide, those are described here: https://docs.dataminer.services/develop/CICD/GitHub/GitHubReusableWorkflows/GitHub_Reusable_Workflows_Master_Workflow.html#inputs
In your case, I believe you only need to add
DATAMINER_TOKEN
(The API key generated in the dataminer.services Admin app. Required when publishing to the Catalog on a release tag.)
So it becomes (note you will need to change the syntax to valid yaml if copy-pasting):
CI:
uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/Master Workflow.yml@main
secrets:
DATAMINER_TOKEN: ${{ secrets.DATAMINER_TOKEN }}
With that workflow, if you make a release or pre-release in GitHub it will publish to the catalog for you.
hello Jan
Using the maste workflow i got this error
The workflow is not valid. .github/workflows/updatecatalogdetails.yml (Line: 21, Col: 3): Error calling workflow 'SkylineCommunications/_ReusableWorkflows/.github/workflows/Master Workflow.yml@main'. The workflow is requesting 'actions: read, packages: write, id-token: write', but is only allowed 'actions: none, packages: read, id-token: none'. .github/workflows/updatecatalogdetails.yml (Line: 21, Col: 3): Error calling workflow 'SkylineCommunications/_ReusableWorkflows/.github/workflows/Master Workflow.yml@main'. The nested job 'set_repo_type' is requesting 'id-token: write', but is only allowed 'id-token: none'.
Should i change somethin in the github config? its a new account
Thanks