From c21a377232b3b4e6547d77786c424a7680b8fa2b Mon Sep 17 00:00:00 2001 From: Jan Staelens Date: Wed, 31 Jan 2024 13:23:29 +0100 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..46d4f64 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,64 @@ +name: DataMiner CICD Connector + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [] + tags: + - "[0-9]+.[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+.[0-9]+-**" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + + CI: + uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/Connector Master Workflow.yml@Connectors + with: + referenceName: ${{ github.ref_name }} + runNumber: ${{ github.run_number }} + referenceType: ${{ github.ref_type }} + repository: ${{ github.repository }} + owner: ${{ github.repository_owner }} + sonarCloudProjectName: SkylineCommunications_SLC-C-Example_ExportImport + secrets: + # The API-key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner System. + api-key: ${{ secrets.DATAMINER_DEPLOY_KEY }} + sonarCloudToken: ${{ secrets.SONAR_TOKEN }} + + # Optional 0 or More CD Jobs as needed + # CD: + # # if: github.ref_type == 'tag' + # environment: staging + # name: CD + # runs-on: windows-latest + # needs: CI + + # steps: + # - uses: actions/checkout@v3 + + # - name: Install DataMiner Deploy + # run: dotnet tool install -g Skyline.DataMiner.CICD.Tools.DataMinerDeploy + + # # Deploys the artifact directly to an internet-accessible DataMiner Agent. Deployment from the catalog currently not supported. + # - name: Download Created Connector Package + # id: downloadPackage + # uses: actions/download-artifact@v4 + # with: + # name: Connector Package + # path: _PackageResults + + # - name: Find .dmprotocol + # id: findcreatedpackage + # run: | + # IFS=$'\n' + # echo packageName=$(find _PackageResults -type f -name '*.dmprotocol') >> $GITHUB_OUTPUT + # unset IFS + # shell: bash + + # - name: Direct Agent Deployment + # run: dataminer-package-deploy from-artifact --path-to-artifact "${{ steps.findcreatedpackage.outputs.packageName }}" --dm-server-location "${{ secrets.serverLocation }}" --dm-user "${{ secrets.dataminerUser }}" --dm-password "${{ secrets.dataminerPassword }}" +