More workflow linting changes (#3380)

Pickup a few missed things to get linting running
on github actions changes

Lint job is re-added in #3391 which will merge
after this one does so we can verify it's working

---

#### 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
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issues

* #3389 

#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-05-11 10:17:54 -07:00 committed by GitHub
parent 0202207f3e
commit ebbf8aef75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 41 deletions

View File

@ -9,6 +9,9 @@ on:
websitefileschanged: websitefileschanged:
description: "'true' if websites/** or .github/workflows/** files have changed in the branch" description: "'true' if websites/** or .github/workflows/** files have changed in the branch"
value: ${{ jobs.file-change-check.outputs.websitefileschanged }} value: ${{ jobs.file-change-check.outputs.websitefileschanged }}
actionsfileschanged:
description: "'true' if .github/actions/** or .github/workflows/** files have changed in the branch"
value: ${{ jobs.file-change-check.outputs.actionsfileschanged }}
jobs: jobs:
file-change-check: file-change-check:
@ -52,9 +55,9 @@ jobs:
echo "website or workflow file changes occurred" 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 - name: Check dorny for changes in actions filepaths
id: actionschecker id: actionschecker
if: steps.dornycheck.outputs.actions == 'true' if: steps.dornycheck.outputs.actions == 'true'
run: | run: |
echo "workflow file changes occurred" echo "actions file changes occurred"
echo actionsfileschanged=true >> $GITHUB_OUTPUT echo actionsfileschanged=true >> $GITHUB_OUTPUT

View File

@ -1,39 +0,0 @@
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