Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ci only when changed files #97

Merged
merged 6 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,14 @@ updates:
pulumi-dev:
dependency-type: "development"
- package-ecosystem: cargo
directory: /app/fetcher
directories:
- /app/fetcher
- /app/bot
schedule:
interval: monthly
time: "12:00"
day: wednesday
groups:
fetcher:
patterns:
- "*"
- package-ecosystem: cargo
directory: /app/bot
schedule:
interval: monthly
time: "12:00"
day: wednesday
groups:
bot:
cargo:
patterns:
- "*"
16 changes: 16 additions & 0 deletions .github/workflows/infra-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Infrastructure Security Scan (local repository)
on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ghas-kics-${{ github.ref }}
cancel-in-progress: true

jobs:
infra-scan:
uses: notdodo/github-actions/.github/workflows/[email protected]
37 changes: 33 additions & 4 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,55 @@ on:
paths:
- app/fetcher/**
- app/bot/**
- .github/workflows/lambda-deploy.yml
- .github/workflows/rust-ci.yml

concurrency:
group: ghas-erfiume-lambda-deploy-${{ github.ref }}
group: ghas-erfiume-ci-${{ github.ref }}

jobs:
changed-files:
runs-on: ubuntu-latest
name: Check changed-files
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
# v4.2.2
with:
fetch-depth: 0

- id: changed-files
uses: tj-actions/changed-files@bab30c2299617f6615ec02a68b9a40d10bd21366
# v45.0.5
with:
files_yaml: |
fetcher:
- app/fetcher/**
bot:
- app/bot/**
ci:
- .github/workflows/rust-ci.yml
outputs:
fetcher_any_changed: ${{ steps.changed-files.outputs.fetcher_any_changed }}
bot_any_changed: ${{ steps.changed-files.outputs.bot_any_changed }}
ci_any_changed: ${{ steps.changed-files.outputs.ci_any_changed }}

rust-ci-fetcher:
needs: changed-files
permissions:
actions: read
security-events: write
contents: read
uses: notdodo/github-actions/.github/workflows/[email protected]
if: needs.changed-files.outputs.fetcher_any_changed == 'true' || needs.changed-files.outputs.ci_any_changed == 'true'
uses: notdodo/github-actions/.github/workflows/[email protected]
with:
working-directory: ./app/fetcher

rust-ci-bot:
needs: changed-files
permissions:
actions: read
security-events: write
contents: read
uses: notdodo/github-actions/.github/workflows/[email protected]
if: needs.changed-files.outputs.bot_any_changed == 'true' || needs.changed-files.outputs.ci_any_changed == 'true'
uses: notdodo/github-actions/.github/workflows/[email protected]
with:
working-directory: ./app/bot
Loading