Lint GitHub actions changes (#3359)
Reduce errors when updating actions and workflows and hopefully stop silent failures for things --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Supportability/Tests - [x] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
e5b1291d36
commit
255c027c94
10
.github/workflows/_filechange_checker.yml
vendored
10
.github/workflows/_filechange_checker.yml
vendored
@ -19,6 +19,7 @@ jobs:
|
||||
outputs:
|
||||
srcfileschanged: ${{ steps.srcchecker.outputs.srcfileschanged }}
|
||||
websitefileschanged: ${{ steps.websitechecker.outputs.websitefileschanged }}
|
||||
actionsfileschanged: ${{ steps.actionschecker.outputs.actionsfileschanged }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
@ -49,4 +50,11 @@ jobs:
|
||||
if: steps.dornycheck.outputs.src == 'true' || steps.dornycheck.outputs.website == 'true' || steps.dornycheck.outputs.actions == 'true'
|
||||
run: |
|
||||
echo "website or workflow file changes occurred"
|
||||
echo websitefileschanged=true >> $GITHUB_OUTPUT
|
||||
echo websitefileschanged=true >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check dorny for changes in workflow filepaths
|
||||
id: actionschecker
|
||||
if: steps.dornycheck.outputs.actions == 'true'
|
||||
run: |
|
||||
echo "workflow file changes occurred"
|
||||
echo actionsfileschanged=true >> $GITHUB_OUTPUT
|
||||
|
||||
39
.github/workflows/actions-lint.yml
vendored
Normal file
39
.github/workflows/actions-lint.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
name: Lint GitHub actions
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
pull_request:
|
||||
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*.*.*"]
|
||||
|
||||
# cancel currently running jobs if a new version of the branch is pushed
|
||||
concurrency:
|
||||
group: actions-lint-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
# --- Prechecks and Checkouts ------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
Precheck:
|
||||
uses: alcionai/corso/.github/workflows/_filechange_checker.yml@main
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
# --- Workflow Action Linting ------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
Actions-Lint:
|
||||
needs: [Precheck]
|
||||
environment: Testing
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.precheck.outputs.actionsfileschanged == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: actionlint
|
||||
uses: raven-actions/actionlint@v1
|
||||
with:
|
||||
fail-on-error: true
|
||||
cache: true
|
||||
1
.github/workflows/nightly_test.yml
vendored
1
.github/workflows/nightly_test.yml
vendored
@ -50,7 +50,6 @@ jobs:
|
||||
environment: ${{ steps.environment.outputs.environment }}
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
website-bucket: ${{ steps.website-bucket.outputs.website-bucket }}
|
||||
website-cfid: ${{ steps.website-cfid.outputs.website-cfid }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
||||
3
.github/workflows/website-publish.yml
vendored
3
.github/workflows/website-publish.yml
vendored
@ -28,8 +28,7 @@ jobs:
|
||||
- name: Get version string
|
||||
id: version
|
||||
run: |
|
||||
echo "set-output name=version::$(git describe --tags --abbrev=0)"
|
||||
echo "::set-output name=version::$(git describe --tags --abbrev=0)"
|
||||
echo version=$(git describe --tags --abbrev=0) | tee -a $GITHUB_OUTPUT
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
# --- Website Linting -----------------------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user