From d56491980abbd7e48f5416fed9a9ea5ae28b465f Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Mon, 25 Mar 2024 11:26:22 -0600 Subject: [PATCH 1/3] non-dockerfile cyclonedex --- .github/workflows/checks.yaml | 35 ----------------------- .github/workflows/{tests.yaml => ci.yaml} | 25 ++++++++++++++++ Dockerfile | 3 -- 3 files changed, 25 insertions(+), 38 deletions(-) delete mode 100644 .github/workflows/checks.yaml rename .github/workflows/{tests.yaml => ci.yaml} (81%) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml deleted file mode 100644 index c64c47ef..00000000 --- a/.github/workflows/checks.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Checks - -on: - pull_request: - -jobs: - analyze: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.19.6 - - run: dart pub get - - run: dart run dart_dev analyze - - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.19.6 - - run: dart pub get - - run: dart run dart_dev format --check - - dependency-validator: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.19.6 - - run: dart pub get - - run: dart run dependency_validator \ No newline at end of file diff --git a/.github/workflows/tests.yaml b/.github/workflows/ci.yaml similarity index 81% rename from .github/workflows/tests.yaml rename to .github/workflows/ci.yaml index 216e7870..c0bc7ba4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,31 @@ on: jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - 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 + with: + path: ./ + format: cyclonedx-json + snapshots: runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index 1f3f575e..c35f1b5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1 @@ -FROM drydock-prod.workiva.net/workiva/dart2_base_image:2 -ADD pubspec.yaml pubspec.yaml -RUN dart pub get FROM scratch From 97fd2563fc322a9b624b236ea9cb5d2573dc1937 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Mon, 25 Mar 2024 11:35:37 -0600 Subject: [PATCH 2/3] additional comments --- .github/workflows/ci.yaml | 4 ++++ Dockerfile | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 Dockerfile diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c0bc7ba4..e49efc13 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,10 @@ on: - master pull_request: +permissions: + pull-requests: write + contents: write + id-token: write jobs: checks: diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c35f1b5f..00000000 --- a/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM scratch From ecfad2fa3fbc3483345bd21618520e4498ee44d1 Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Tue, 26 Mar 2024 08:46:31 -0600 Subject: [PATCH 3/3] empty change --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e49efc13..85f2cd73 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,10 +1,10 @@ name: Tests on: + pull_request: push: branches: - master - pull_request: permissions: pull-requests: write