mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-04 01:18:50 +00:00
refactor(ci): reduce complexity in required workflows (#3925)
* refactor(ci): builds upon work in tests to reduce complexity in requiring workflows * fix: tweaks and missing outputs * fix: make sure the new workflows actually run * fix: consistency with non-required testing image
This commit is contained in:
47
.github/workflows/codeql.yml
vendored
47
.github/workflows/codeql.yml
vendored
@@ -13,10 +13,9 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- '**.go'
|
||||
- '**.js'
|
||||
branches:
|
||||
- 'main'
|
||||
- 'releases-**'
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
types:
|
||||
@@ -24,19 +23,34 @@ on:
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- '**.go'
|
||||
- '**.js'
|
||||
branches:
|
||||
- 'main'
|
||||
- 'releases-**'
|
||||
|
||||
schedule:
|
||||
- cron: '17 9 * * 5'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
changes:
|
||||
outputs:
|
||||
should-run-analyze: ${{ steps.changes.outputs.src == 'true' }}
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: changes
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
- '**.go'
|
||||
- '**.js4'
|
||||
|
||||
analyze:
|
||||
needs: [changes]
|
||||
name: Analyze
|
||||
if: github.event.pull_request.draft == false && needs.changes.outputs.should-run-analyze == 'true'
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
@@ -87,3 +101,14 @@ jobs:
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
||||
skip-analyze:
|
||||
needs: [changes]
|
||||
if: needs.changes.outputs.should-run-analyze == 'false'
|
||||
name: Analyze
|
||||
strategy:
|
||||
matrix:
|
||||
language: [ 'go', 'javascript' ]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
Reference in New Issue
Block a user