Skip to content

Commit 47b419f

Browse files
Niall LangleyNJLangley
authored andcommitted
Added a simple GitHub action to connect to Azure
1 parent d4b0248 commit 47b419f

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed

.github/workflows/test_azure_devtest_labs_integration.yml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,55 @@ on:
77
# Triggers the workflow on push or pull request events but only for the main branch
88
push:
99
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+
1514
# Allows you to run this workflow manually from the Actions tab
1615
workflow_dispatch:
1716

1817
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1918
jobs:
2019
# This workflow contains a single job called "build"
2120
build-and-integration-test:
22-
name: Build and run tests on Azure DevTest Labs
2321
# The type of runner that the job will run on
2422
runs-on: ubuntu-latest
2523

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
2725
steps:
2826
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2927
- 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

Comments
 (0)