Skip to content

Commit

Permalink
Update Workflows (#385)
Browse files Browse the repository at this point in the history
* Consistently use azure/powershell@v1

* Consistently use actions/checkout@v4

* Consistently use actions/setup-node@v4

* Consistently use actions/github-script@v7

* Consistently use actions/stale@v8

* Specify codql language as javascript

See https://api.github.com/repos/github/codeql-action/issues/comments/762138640

* Name ci.yml

* CodeQL does not need a special code
  • Loading branch information
jsoref authored Dec 27, 2023
1 parent 1b07ea9 commit 165d687
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/azure-login-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
az --version
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Az CLI login with subscription'
uses: azure/login@v1
Expand Down
62 changes: 31 additions & 31 deletions .github/workflows/azure-login-negative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

steps:
- name: 'Checking out repo code'
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4

- name: Set Node.js 16.x for GitHub Action
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16.x

Expand All @@ -44,7 +44,7 @@ jobs:
- name: Run Azure PowerShell
id: ps_1
continue-on-error: true
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Check Last step failed
if: steps.ps_1.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -76,15 +76,15 @@ jobs:
- name: Run Azure PowerShell again
id: ps_2
continue-on-error: true
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
(Get-AzContext).Environment.Name -eq 'AzureCloud'
- name: Check Last step failed
if: steps.ps_2.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -99,10 +99,10 @@ jobs:
steps:

- name: 'Checking out repo code'
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4

- name: Set Node.js 16.x for GitHub Action
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16.x

Expand Down Expand Up @@ -130,15 +130,15 @@ jobs:
- name: Check Last step failed
if: steps.cli_3.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
- name: Run Azure PowerShell
id: ps_3
continue-on-error: true
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand All @@ -148,7 +148,7 @@ jobs:
- name: Check Last step failed
if: steps.ps_3.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -162,10 +162,10 @@ jobs:

steps:
- name: 'Checking out repo code'
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4

- name: Set Node.js 16.x for GitHub Action
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16.x

Expand All @@ -184,7 +184,7 @@ jobs:

- name: Check Last step failed
if: steps.login_4.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -199,7 +199,7 @@ jobs:

- name: Check Last step failed
if: steps.login_5.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -213,7 +213,7 @@ jobs:

- name: Check Last step failed
if: steps.login_6.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -229,7 +229,7 @@ jobs:

- name: Check Last step failed
if: steps.login_7.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -246,7 +246,7 @@ jobs:

- name: Check Last step failed
if: steps.login_8.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -266,7 +266,7 @@ jobs:
- name: Run Azure PowerShell
id: ps_8
continue-on-error: true
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand All @@ -276,7 +276,7 @@ jobs:
- name: Check Last step failed
if: steps.ps_8.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -296,7 +296,7 @@ jobs:
- name: Run Azure PowerShell
id: ps_9
continue-on-error: true
uses: azure/powershell@v1.2.0
uses: azure/powershell@v1
with:
azPSVersion: "latest"
inlineScript: |
Expand All @@ -306,7 +306,7 @@ jobs:
- name: Check Last step failed
if: steps.ps_9.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -325,7 +325,7 @@ jobs:

- name: Check Last step failed
if: steps.login_10.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -342,7 +342,7 @@ jobs:

- name: Check Last step failed
if: steps.login_11.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -362,7 +362,7 @@ jobs:

- name: Check Last step failed
if: steps.login_12.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -378,7 +378,7 @@ jobs:

- name: Check Last step failed
if: steps.login_13.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -394,7 +394,7 @@ jobs:

- name: Check Last step failed
if: steps.login_14.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -409,7 +409,7 @@ jobs:

- name: Check Last step failed
if: steps.login_15.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Expand All @@ -423,10 +423,10 @@ jobs:

steps:
- name: 'Checking out repo code'
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4

- name: Set Node.js 16.x for GitHub Action
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16.x

Expand All @@ -442,7 +442,7 @@ jobs:

- name: Check Last step failed
if: steps.login_14.outcome == 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Last action should fail but not. Please check it.')
Loading

0 comments on commit 165d687

Please sign in to comment.