From 7f84661dc0c4a09d36563cfdf5f1dc63be6fa6ec Mon Sep 17 00:00:00 2001 From: ritika-du Date: Mon, 28 Oct 2024 16:48:00 -0400 Subject: [PATCH] chore: change lint.yaml --- .github/workflows/lint.yaml | 34 ++++--------------- .../workflows/pull-request-conditionals.yaml | 30 ---------------- 2 files changed, 7 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/pull-request-conditionals.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 12c6081..7c6809f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,35 +1,15 @@ +# Copyright 2024 Defense Unicorns +# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial + name: Scan on: # This workflow is triggered on pull requests to the main branch. pull_request: - branches: [main] - types: [milestoned, opened, synchronize] + # milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow). + types: [milestoned, opened, reopened, synchronize] jobs: validate: - runs-on: ubuntu-latest - name: Lint - permissions: - contents: read # Allows reading the repo contents - - steps: - - name: Checkout - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - fetch-depth: 0 - - - name: Environment setup - uses: defenseunicorns/uds-common/.github/actions/setup@24c8a2a48eeb33773b76b3587c489cb17496c9e0 # v0.12.0 - with: - registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }} - registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }} - ghToken: ${{ secrets.GITHUB_TOKEN }} - - - name: Install lint deps - run: | - uds run lint:deps - - - name: Lint the repository - run: | - uds run lint:yaml \ No newline at end of file + uses: defenseunicorns/uds-common/.github/workflows/callable-lint.yaml@97fc3a00fb2b9897316131cd210026691e160d5a # v1.1.1 + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pull-request-conditionals.yaml b/.github/workflows/pull-request-conditionals.yaml deleted file mode 100644 index 9de8ac5..0000000 --- a/.github/workflows/pull-request-conditionals.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Setup - -# This workflow is triggered on pull requests to the main branch. -on: - pull_request: - paths: - - ".github/**" - - "bundle/**" - - "values/**" - - "tasks/**" - - "tests/**" - - "tasks.yaml" - - "zarf.yaml" - -# Permissions for the GITHUB_TOKEN used by the workflow. -permissions: - id-token: write # Needed for OIDC-related operations. - contents: read # Allows reading the content of the repository. - pull-requests: read # Allows reading pull request metadata. - -# Default settings for all run commands in the workflow jobs. -defaults: - run: - shell: bash -e -o pipefail {0} # Ensures that scripts fail on error and pipefail is set. - -jobs: - run-test: - name: Test - uses: ./.github/workflows/test.yaml - secrets: inherit