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
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
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
|