-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathgithub-actions.yml
More file actions
50 lines (43 loc) · 1.52 KB
/
github-actions.yml
File metadata and controls
50 lines (43 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# GitHub Actions workflow for azqr
name: azqr-pipeline
on:
workflow_dispatch: # Trigger manually
schedule: # Trigger every Friday at midnight
- cron: "0 0 * * 5"
push:
branches:
- main # Trigger on push to main
pull_request:
branches:
- main # Trigger on pull request to main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v2
# Install azqr
- name: Install azqr
run: |
latestAzqr=$(curl -sL https://api.github.com/repos/Azure/azqr/releases/latest | jq -r ".tag_name" | cut -c1-) \
&& wget https://github.com/Azure/azqr/releases/download/$latestAzqr/azqr-linux-amd64.zip -O azqr.zip \
&& unzip -uj -qq azqr.zip -d /usr/local/bin \
&& rm azqr.zip \
&& chmod +x /usr/local/bin/azqr
# Run azqr scan
- name: Run azqr scan
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
run: |
timestamp=$(date '+%Y%m%d%H%M%S')
echo "DATETIME=$timestamp" >> $GITHUB_ENV
azqr scan -o "${{ github.workspace }}/azqr_action_plan_$timestamp"
# Publish azqr action plan
- name: Publish azqr action plan
uses: actions/upload-artifact@v2
with:
name: azqr_result
path: ${{ github.workspace }}/azqr_action_plan_${{ env.DATETIME }}.xlsx