Skip to content

Commit

Permalink
Merge branch 'main' into policycheck-success-on-no-projects
Browse files Browse the repository at this point in the history
  • Loading branch information
jamengual authored Nov 15, 2023
2 parents f95ff71 + ce2b992 commit 49f3389
Show file tree
Hide file tree
Showing 81 changed files with 2,087 additions and 1,157 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
# that flag starts the download asynchronously so we'd have a race
# condition.
# renovate: datasource=github-releases depName=hashicorp/terraform versioning=hashicorp
TERRAFORM_VERSION: 1.5.7
TERRAFORM_VERSION: 1.6.3
steps:
- checkout
- run: make build-service
Expand Down
2 changes: 2 additions & 0 deletions .github/cherry-pick-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enabled: true
preservePullRequestTitle: true
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
commitMessageSuffix: " in {{packageFile}}",
dependencyDashboardAutoclose: true,
automerge: true,
baseBranches: ["main", "/^release\-.*/"],
platformAutomerge: true,
labels: ["dependencies"],
postUpdateOptions: [
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/atlantis-image-required.yml

This file was deleted.

42 changes: 36 additions & 6 deletions .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,43 @@ on:
push:
branches:
- 'main'
- 'release-**'
tags:
- v*.*.* # stable release like, v0.19.2
- v*.*.*-pre.* # pre release like, v0.19.0-pre.calendardate
pull_request:
paths:
- 'Dockerfile'
- 'docker-entrypoint.sh'
- '.github/workflows/atlantis-image.yml'
- '**.go'
- 'go.*'
branches:
- 'main'
- 'release-**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
outputs:
should-run-build: ${{ steps.changes.outputs.src == 'true' }}
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- 'Dockerfile'
- 'docker-entrypoint.sh'
- '.github/workflows/atlantis-image.yml'
- '**.go'
- 'go.*'
build:
needs: [changes]
if: needs.changes.outputs.should-run-build == 'true'
name: Build Image
strategy:
matrix:
image_type: [alpine, debian]
Expand Down Expand Up @@ -123,3 +142,14 @@ jobs:
target: ${{ matrix.image_type }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.description'] }}

skip-build:
needs: [changes]
if: needs.changes.outputs.should-run-build == 'false'
name: Build Image
strategy:
matrix:
image_type: [alpine, debian]
runs-on: ubuntu-22.04
steps:
- run: 'echo "No build required"'
40 changes: 0 additions & 40 deletions .github/workflows/codeql-required.yml

This file was deleted.

45 changes: 35 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,44 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
paths:
- '**.go'
- '**.js'
branches:
- 'main'
- 'release-**'
pull_request:
# The branches below must be a subset of the branches above
types:
- opened
- reopened
- synchronize
- ready_for_review
branches: [ "main" ]
paths:
- '**.go'
- '**.js'
branches:
- 'main'
- 'release-**'

schedule:
- cron: '17 9 * * 5'

jobs:
changes:
outputs:
should-run-analyze: ${{ steps.changes.outputs.src == 'true' }}
if: github.event.pull_request.draft == false
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
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && needs.changes.outputs.should-run-analyze == 'true'
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
Expand Down Expand Up @@ -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"'
32 changes: 0 additions & 32 deletions .github/workflows/lint-required.yml

This file was deleted.

36 changes: 29 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,46 @@ on:
- ready_for_review
branches:
- "main"
paths:
- '**.go'
- 'go.*'
- '.github/workflows/lint.yml'
- '.golangci.yml'
- 'release-**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
golangci-lint:
changes:
outputs:
should-run-linting: ${{ steps.changes.outputs.go == 'true' }}
if: github.event.pull_request.draft == false
name: runner / golangci-lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
go:
- '**.go'
- 'go.*'
- '.github/workflows/lint.yml'
- '.golangci.yml'
golangci-lint:
needs: [changes]
if: github.event.pull_request.draft == false && needs.changes.outputs.should-run-linting == 'true'
name: Linting
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
tool_name: golangci-lint

skip-lint:
needs: [changes]
if: needs.changes.outputs.should-run-linting == 'false'
name: Linting
runs-on: ubuntu-22.04
steps:
- run: 'echo "No build required"'
2 changes: 1 addition & 1 deletion .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/renovate-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ on:
- '.github/renovate.json5'
branches:
- main
- 'releases-**'
pull_request:
paths:
- '.github/renovate.json5'
workflow_dispatch:

jobs:
validate:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
- run: npx --package renovate -c 'renovate-config-validator'
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@v8
with:
Expand Down
Loading

0 comments on commit 49f3389

Please sign in to comment.