diff --git a/.github/workflows/_filechange_checker.yml b/.github/workflows/_filechange_checker.yml index 8d02d1437..96e03c9d8 100644 --- a/.github/workflows/_filechange_checker.yml +++ b/.github/workflows/_filechange_checker.yml @@ -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 \ No newline at end of file + 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 diff --git a/.github/workflows/actions-lint.yml b/.github/workflows/actions-lint.yml new file mode 100644 index 000000000..95629a134 --- /dev/null +++ b/.github/workflows/actions-lint.yml @@ -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 diff --git a/.github/workflows/nightly_test.yml b/.github/workflows/nightly_test.yml index 2ab0b7b8d..22eddba52 100644 --- a/.github/workflows/nightly_test.yml +++ b/.github/workflows/nightly_test.yml @@ -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 diff --git a/.github/workflows/website-publish.yml b/.github/workflows/website-publish.yml index b53ed320d..dda3909e9 100644 --- a/.github/workflows/website-publish.yml +++ b/.github/workflows/website-publish.yml @@ -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 -----------------------------------------------------------------------------------