|
| 1 | +name: DataMiner DeployOnly Automation |
| 2 | + |
| 3 | +# Prerequisite: secret 'DATAMINER_DEPLOY_KEY' necessary on Repository or Organization level. |
| 4 | +# Value is the API-key generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner System. |
| 5 | + |
| 6 | +# Controls when the workflow will run |
| 7 | +on: |
| 8 | + # Triggers the workflow on push or pull request events but only for the master branch |
| 9 | + push: |
| 10 | + branches: [] |
| 11 | + tags: |
| 12 | + - "[0-9]+.[0-9]+.[0-9]+.[0-9]+" |
| 13 | + - "[0-9]+.[0-9]+.[0-9]+.[0-9]+-**" |
| 14 | + |
| 15 | + # Allows you to run this workflow manually from the Actions tab |
| 16 | + workflow_dispatch: |
| 17 | + |
| 18 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 19 | +jobs: |
| 20 | + CD: |
| 21 | + name: CD |
| 22 | + environment: staging |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v3 |
| 26 | + |
| 27 | + - name: Find .sln file |
| 28 | + id: findSlnFile |
| 29 | + run: | |
| 30 | + echo solutionFilePath=$(find . -type f -name '*.sln') >> $GITHUB_OUTPUT |
| 31 | + shell: bash |
| 32 | + |
| 33 | + - name: Skyline DataMiner Deploy Action Development |
| 34 | + if: github.ref_type == 'branch' |
| 35 | + uses: SkylineCommunications/Skyline-DataMiner-Deploy-Action@v1 |
| 36 | + with: |
| 37 | + # Stage deploy |
| 38 | + stage: All |
| 39 | + # The API-key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner System. |
| 40 | + api-key: ${{ secrets.DATAMINER_DEPLOY_KEY }} |
| 41 | + solution-path: ./${{ steps.findSlnFile.outputs.solutionFilePath }} |
| 42 | + artifact-name: ${{ github.repository }} ${{ github.ref_name }}_B${{ github.run_number }} |
| 43 | + build-number: ${{ github.run_number }} |
| 44 | + |
| 45 | + - name: Skyline DataMiner Deploy Action Release |
| 46 | + if: github.ref_type == 'tag' |
| 47 | + uses: SkylineCommunications/Skyline-DataMiner-Deploy-Action@v1 |
| 48 | + with: |
| 49 | + # Stage deploy |
| 50 | + stage: All |
| 51 | + # The API-key: generated in the DCP Admin app (https://admin.dataminer.services/) as authentication for a certain DataMiner System. |
| 52 | + api-key: ${{ secrets.DATAMINER_DEPLOY_KEY }} |
| 53 | + solution-path: ./${{ steps.findSlnFile.outputs.solutionFilePath }} |
| 54 | + artifact-name: ${{ github.repository }} ${{ github.ref_name }} |
| 55 | + version: ${{ github.ref_name }} |
| 56 | + |
0 commit comments