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.
Yes, this is a GitHub Actions permissions issue.
Our reusable workflow requires a few permissions that your calling workflow currently doesn't grant.
Try adding this near the top level of your workflow:
permissions:
contents: read
actions: read
packages: write
id-token: write
So this should be at the workflow level, before `jobs:`.
You can also check your repository under **Settings → Actions → General → Workflow permissions**. Since this is a new account/repository, GitHub uses more restrictive permissions by default.
Hi Jan,
The permissions didn't work, so I forked the repository; the process now runs and proceeds, but it only gets as far as the "CI / Package & Sign (Windows)" stage. The subsequent steps—"Set Repo type", "Package Ubuntu Services", "Upload DxM", "Push Nuget Packages", and "Upload to catalog"—did not start. Do I need to configure anything else in the main workflow to enable these steps?
Thanks.
Right, when you just commit & push it will only run testing and validation steps.
To actually trigger a push to catalog you have to release (or pre-release) you have to create a Release under "Releases" in GitHub.
You should see 'releases' on the right of your screen when you're in the Code tab of your GitHub Repository. You then say for example create new tag "1.0.0" for a stable release or "1.0.0-alpha" for a pre-release (you may replace the word 'alpha' with any word & number combination)
I'm not sure I follow how you had to create a Fork before GitHub Actions allowed the permissions, if your github user has the right ownership of the initial repository then you should have been able to adjust the permissions for that to work I believe.
i made the fork to run and test because i dint maked with the permission, after i will try changing the setting to find the correct config.
About the release it allready have a realse v1.0.0.0 and runing the job anly pass the quality, it dont execute the upload, after that realese creation a have to do sonfing alse?
Thanks
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