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

FEDX-1388: Implement gha-dart-oss #132

Merged
merged 8 commits into from
Aug 6, 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
43 changes: 17 additions & 26 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,24 @@ permissions:

jobs:
checks:
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]

sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.6

- run: dart pub get

- name: Analyze
run: dart run dart_dev analyze

- name: Format
run: dart run dart_dev format --check

- name: Validate Dependencies
run: dart run dependency_validator

- name: Generate SBOM
uses: anchore/sbom-action@v0
- uses: anchore/sbom-action@v0
with:
path: ./
format: cyclonedx-json

snapshots:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install scip cli
run: |
bash -c 'curl -L "https://github.com/sourcegraph/scip/releases/download/v0.3.3/scip-linux-amd64.tar.gz"' | tar xzf - scip
Expand Down Expand Up @@ -83,12 +73,12 @@ jobs:
consumer:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
repo: [
"Workiva/over_react",
"Workiva/w_module",
"rrousselGit/provider",
"dart-lang/args",
consumer: [
{ repo: "Workiva/over_react" },
{ repo: "Workiva/w_module" },
{ repo: "dart-lang/args", ref: "v2.4.2" } # master requires dart 3
]

steps:
Expand All @@ -100,12 +90,13 @@ jobs:
- run: dart pub get

# Setup repo to run on
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repo: ${{ matrix.repo }}
path: ${{ matrix.repo }}
repository: ${{ matrix.consumer.repo }}
path: ${{ matrix.consumer.repo}}
ref: ${{ matrix.consumer.ref || 'master' }}
- run: dart pub get
working-directory: ${{ matrix.repo }}
working-directory: ${{ matrix.consumer.repo }}

- run: |
dart run scip_dart ./${{ matrix.repo }} || exit 1
dart run scip_dart ./${{ matrix.consumer.repo }} || exit 1
16 changes: 16 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
# Generates and uploads sbom, and publishes to pub.dev
publish:
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
Loading