|
7 | 7 | # Triggers the workflow on push or pull request events but only for the main branch
|
8 | 8 | push:
|
9 | 9 | branches:
|
10 |
| - - main |
11 |
| - - feature/* |
12 |
| - pull_request: |
13 |
| - branches: |
14 |
| - - main |
| 10 | + - feature/azure-devtest-labs-arm-CICD |
| 11 | + #pull_request: |
| 12 | + # branches: [ main ] |
| 13 | + |
15 | 14 | # Allows you to run this workflow manually from the Actions tab
|
16 | 15 | workflow_dispatch:
|
17 | 16 |
|
18 | 17 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
19 | 18 | jobs:
|
20 | 19 | # This workflow contains a single job called "build"
|
21 | 20 | build-and-integration-test:
|
22 |
| - name: Build and run tests on Azure DevTest Labs |
23 | 21 | # The type of runner that the job will run on
|
24 | 22 | runs-on: ubuntu-latest
|
25 | 23 |
|
26 |
| -# Steps represent a sequence of tasks that will be executed as part of the job |
| 24 | + # Steps represent a sequence of tasks that will be executed as part of the job |
27 | 25 | steps:
|
28 | 26 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
29 | 27 | - uses: actions/checkout@v2
|
| 28 | + |
| 29 | + # Login to Azure |
| 30 | + - name: Log into Azure |
| 31 | + uses: azure/login@v1 |
| 32 | + with: |
| 33 | + creds: '${{ secrets.AZURE_DEV_TEST_LABS_CREDENTIALS }}' |
| 34 | + |
| 35 | + - name: Azure CLI script |
| 36 | + uses: azure/CLI@v1 |
| 37 | + with: |
| 38 | + #azcliversion: 2.0.72 |
| 39 | + inlineScript: | |
| 40 | + az version |
| 41 | + az account show |
| 42 | +
|
| 43 | + # # Once logged into Azure, run a test command to check it worked |
| 44 | + # - name: Azure CLI script |
| 45 | + # uses: azure/CLI@v1 |
| 46 | + # with: |
| 47 | + # # This is the version with the fix for creating a DevTest lab |
| 48 | + # azcliversion: 2.24.0 |
| 49 | + # inlineScript: | |
| 50 | + # az account show |
| 51 | + |
| 52 | + |
| 53 | + # # Runs a single command using the runners shell |
| 54 | + # - name: Run a one-line script |
| 55 | + # run: echo Hello, world! |
| 56 | + |
| 57 | + # # Runs a set of commands using the runners shell |
| 58 | + # - name: Run a multi-line script |
| 59 | + # run: | |
| 60 | + # echo Add other actions to build, |
| 61 | + # echo test, and deploy your project. |
0 commit comments