From ebbf8aef754176adc3ddb034d30864469d062f44 Mon Sep 17 00:00:00 2001 From: ashmrtn Date: Thu, 11 May 2023 10:17:54 -0700 Subject: [PATCH] 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? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [x] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issues * #3389 #### Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- .github/workflows/_filechange_checker.yml | 7 ++-- .github/workflows/actions-lint.yml | 39 ----------------------- 2 files changed, 5 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/actions-lint.yml diff --git a/.github/workflows/_filechange_checker.yml b/.github/workflows/_filechange_checker.yml index 96e03c9d8..92201d961 100644 --- a/.github/workflows/_filechange_checker.yml +++ b/.github/workflows/_filechange_checker.yml @@ -9,6 +9,9 @@ on: websitefileschanged: description: "'true' if websites/** or .github/workflows/** files have changed in the branch" 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: file-change-check: @@ -52,9 +55,9 @@ jobs: echo "website or workflow file changes occurred" echo websitefileschanged=true >> $GITHUB_OUTPUT - - name: Check dorny for changes in workflow filepaths + - name: Check dorny for changes in actions filepaths id: actionschecker if: steps.dornycheck.outputs.actions == 'true' run: | - echo "workflow file changes occurred" + echo "actions file changes occurred" echo actionsfileschanged=true >> $GITHUB_OUTPUT diff --git a/.github/workflows/actions-lint.yml b/.github/workflows/actions-lint.yml deleted file mode 100644 index 95629a134..000000000 --- a/.github/workflows/actions-lint.yml +++ /dev/null @@ -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