Update main.yml #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BasicDeployUbuntu | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: InstallPackageCreation | |
run: dotnet tool install -g Skyline.DataMiner.CICD.Tools.Packager | |
- name: Install Catalog Upload | |
run: dotnet tool install -g Skyline.DataMiner.CICD.Tools.CatalogUpload | |
- name: Install DataMiner Deploy | |
run: dotnet tool install -g Skyline.DataMiner.CICD.Tools.DataMinerDeploy | |
- name: Create protocol package | |
if: github.ref_type == 'branch' | |
run: dataminer-package-create dmprotocol "${{ github.workspace }}" --output "${{ github.workspace }}" --name "test" | |
- name: Upload protocol | |
id: UploadDmprotocol | |
run: | | |
uploadOutput=$(dataminer-catalog-upload --path-to-artifact "${{ github.workspace }}/test.dmprotocol" --dm-catalog-token "${{ secrets.DATAMINER_DEPLOY_KEY }}") | |
echo "uploadOutput<<EOF" >> $GITHUB_OUTPUT | |
echo "$uploadOutput" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Check Output | |
if: always() | |
run: | | |
echo "${{ steps.UploadDMPROTOCOL.outputs.uploadOutput }}" | |
- name: Deploy protocol | |
run: | | |
dataminer-package-deploy from-catalog --artifact-id "${{ steps.UploadDmprotocol.outputs.uploadOutput }}" --dm-catalog-token "${{ secrets.DATAMINER_DEPLOY_KEY }}" --debug |