configuring-github-actions — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited configuring-github-actions (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Implements robust CI/CD pipelines using GitHub Actions for Flutter projects. GitHub Actions is the most popular CI/CD platform for open-source and small-to-medium projects. By configuring YAML files under .github/workflows/, you can achieve high automation.
In all Flutter Workflows, the core package to use is the third-party maintained subosito/flutter-action.
Best Practices:
channel: stable or let it automatically fetch the latest version. Explicitly specify flutter-version or use flutter-version-file: pubspec.yaml to guarantee the CI environment exactly matches the local development environment.flutter pub get is a time-consuming step. Always enable cache: true.name: Flutter CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build_and_test:
runs-on: ubuntu-latest # If not building iOS, Ubuntu is the fastest and cheapest
steps:
- name: 📦 Checkout repository
uses: actions/checkout@v4
- name: 🐦 Setup Flutter (Standard or FVM)
uses: subosito/flutter-action@v2
with:
# 🌟 Standard Best Practice: Read from pubspec.yaml
# flutter-version-file: pubspec.yaml
# 🌟 FVM Best Practice: If your team uses FVM, read directly from the FVM config!
flutter-version-file: .fvmrc # Or .fvm/fvm_config.json for older FVM versions
cache: true # 🌟 Enable pub-cache to significantly speed up subsequent builds
# [Optional] If your strict project requirements dictate that all commands MUST be executed via `fvm flutter ...` instead of natively, you must activate the FVM CLI globally:
# - name: 🛠️ Install FVM CLI
# run: dart pub global activate fvm
- name: ⬇️ Get packages
# If FVM CLI is installed, this becomes: `fvm flutter pub get`
run: flutter pub getIf the project uses packages relying on build_runner (like Freezed, Riverpod, go_router builder), you must execute code generation before testing or compiling.
Best Practice: If it is a Pull Request check, use build_runner build --delete-conflicting-outputs to ensure a clean generation state.
- name: ⚙️ Run build_runner
run: dart run build_runner build --delete-conflicting-outputsThis is the core defense line of CI (Continuous Integration), and it's recommended to strictly require passing these for every PR.
# 🌟 Check if code formatting follows Dart guidelines (trailing commas, indentation)
- name: 🔎 Analyze Formatting
run: dart format --output=none --set-exit-if-changed .
# 🌟 Run static analysis to ensure no warnings or lint errors
- name: 🚨 Analyze Code
run: flutter analyze --no-fatal-warnings
# 🌟 Run Unit and Widget Tests (If there are integration tests, set up another job with emulators)
- name: 🧪 Run Tests
run: flutter test --coverageIf setting up a CD (Continuous Deployment) pipeline, you can automatically build an AAB after tests pass.
- name: 🔨 Build Android App Bundle (AAB)
run: flutter build appbundle --release
# Upload the built file to GitHub Actions Artifacts for manual download
- name: 📤 Upload Artifact
uses: actions/upload-artifact@v4
with:
name: release-aab
path: build/app/outputs/bundle/release/app-release.aabThe downside of GitHub Actions is that it isn't great at handling native certificates.
keystore into a Base64 string, store it in GitHub Secrets, and use a script in the Workflow to convert it back to a file.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.