From e1b51b3c286723f3034ae306241c9b051adfb3ed Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 01:50:38 +0100 Subject: [PATCH 01/10] add config parameter Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 60 ++++++++++++++++--------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index 266b515a1..b61a61065 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -4,25 +4,26 @@ on: push: tags: ["v*.*.*"] workflow_dispatch: + pull_request: # Limit to a single workflow concurrency: "deploy-to-prod" jobs: - chainloop_init: - name: Chainloop Init - uses: chainloop-dev/labs/.github/workflows/chainloop_init.yml@64839eb68c20fefda46929c6c6e893cdf0537619 - secrets: - api_token: ${{ secrets.CHAINLOOP_TOKEN }} - with: - workflow_name: "chainloop-docs-release" - project_name: "chainloop" +# chainloop_init: +# name: Chainloop Init +# uses: chainloop-dev/labs/.github/workflows/chainloop_init.yml@64839eb68c20fefda46929c6c6e893cdf0537619 +# secrets: +# api_token: ${{ secrets.CHAINLOOP_TOKEN }} +# with: +# workflow_name: "chainloop-docs-release" +# project_name: "chainloop" deploy_docs: name: Deploy Documentation runs-on: ubuntu-latest - needs: - - chainloop_init +# needs: +# - chainloop_init defaults: run: working-directory: ./docs @@ -45,16 +46,16 @@ jobs: - name: yarn install run: yarn install - - name: Build - run: netlify build +# - name: Build +# run: netlify build +# +# - name: Deploy +# run: netlify deploy --prod - - name: Deploy - run: netlify deploy --prod - - - name: Generate reports - run: | - mkdir -p reports - tar -czf reports/build.tar.gz build +# - name: Generate reports +# run: | +# mkdir -p reports +# tar -czf reports/build.tar.gz build - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 with: @@ -62,6 +63,7 @@ jobs: format: cyclonedx-json upload-artifact: false output-file: docs/reports/sbom.cyclonedx.json + config: .syft.yaml - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 with: @@ -81,13 +83,13 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - chainloop_push: - name: Chainloop Push - uses: chainloop-dev/labs/.github/workflows/chainloop_push.yml@25c77318e739c60e86d3dfe7e864f51c665972dd - needs: - - deploy_docs - secrets: - api_token: ${{ secrets.CHAINLOOP_TOKEN }} - with: - attestation_name: "docs" - workflow_name: "chainloop-docs-release" +# chainloop_push: +# name: Chainloop Push +# uses: chainloop-dev/labs/.github/workflows/chainloop_push.yml@25c77318e739c60e86d3dfe7e864f51c665972dd +# needs: +# - deploy_docs +# secrets: +# api_token: ${{ secrets.CHAINLOOP_TOKEN }} +# with: +# attestation_name: "docs" +# workflow_name: "chainloop-docs-release" From 03fc43505961d4702f7927f16e33301b6a89dfbb Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 01:55:09 +0100 Subject: [PATCH 02/10] path Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index b61a61065..2c22d9c5b 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -62,8 +62,8 @@ jobs: path: . format: cyclonedx-json upload-artifact: false + config: docs/.syft.yaml output-file: docs/reports/sbom.cyclonedx.json - config: .syft.yaml - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 with: From a9367964121b7637b4dfee624304c668540f99e1 Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 02:32:08 +0100 Subject: [PATCH 03/10] create reports dir Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index 2c22d9c5b..68af5915a 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -52,9 +52,9 @@ jobs: # - name: Deploy # run: netlify deploy --prod -# - name: Generate reports -# run: | -# mkdir -p reports + - name: Generate reports + run: | + mkdir -p reports # tar -czf reports/build.tar.gz build - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 From 8a12f126eecd6568c58fe21547643a998cd30b61 Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 02:53:15 +0100 Subject: [PATCH 04/10] fix path Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index 68af5915a..67032d63f 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -62,7 +62,7 @@ jobs: path: . format: cyclonedx-json upload-artifact: false - config: docs/.syft.yaml + config: .syft.yaml output-file: docs/reports/sbom.cyclonedx.json - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 From 20bb909fa43b0cd9b7db8c61fa9b0be920d379e1 Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 03:03:32 +0100 Subject: [PATCH 05/10] debug Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index 67032d63f..2a47b9c1d 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -58,6 +58,8 @@ jobs: # tar -czf reports/build.tar.gz build - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 + env: + ACTIONS_STEP_DEBUG: true with: path: . format: cyclonedx-json From 45b203512ee4b75ae2fb0a51b6ba0de0527c0c79 Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 03:10:02 +0100 Subject: [PATCH 06/10] debug Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index 2a47b9c1d..143f4ef1d 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -59,12 +59,13 @@ jobs: - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 env: + RUNNER_DEBUG: true ACTIONS_STEP_DEBUG: true with: path: . format: cyclonedx-json upload-artifact: false - config: .syft.yaml + config: docs/.syft.yaml output-file: docs/reports/sbom.cyclonedx.json - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 From d28c3490deef227ac8be08e1e106bfe5dbe6a17c Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 03:13:58 +0100 Subject: [PATCH 07/10] set runner debug Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index 143f4ef1d..c26bb95ad 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -59,7 +59,7 @@ jobs: - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 env: - RUNNER_DEBUG: true + RUNNER_DEBUG: "1" ACTIONS_STEP_DEBUG: true with: path: . From 1d7ab5efdc14ad837e750e639dfa5c99fe5a9d59 Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 03:21:28 +0100 Subject: [PATCH 08/10] use wildcard Signed-off-by: Jose I. Paris --- docs/.syft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.syft.yaml b/docs/.syft.yaml index e8e18fc12..b5614ecca 100644 --- a/docs/.syft.yaml +++ b/docs/.syft.yaml @@ -1,2 +1,2 @@ exclude: - - "./node_modules/rtl-detect/.github" \ No newline at end of file + - "**/node_modules/rtl-detect/.github" \ No newline at end of file From b57e94c7930a431dcbda8fee5b67773ce6147aea Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 03:27:34 +0100 Subject: [PATCH 09/10] use default config Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index c26bb95ad..7340dad62 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -65,7 +65,7 @@ jobs: path: . format: cyclonedx-json upload-artifact: false - config: docs/.syft.yaml +# config: docs/.syft.yaml output-file: docs/reports/sbom.cyclonedx.json - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 From d9e4d3cfa8a85a99c43b445caa7152745c74259d Mon Sep 17 00:00:00 2001 From: "Jose I. Paris" Date: Fri, 3 Jan 2025 03:30:02 +0100 Subject: [PATCH 10/10] restore changes Signed-off-by: Jose I. Paris --- .github/workflows/docs_deploy.yml | 58 ++++++++++++++----------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/.github/workflows/docs_deploy.yml b/.github/workflows/docs_deploy.yml index 7340dad62..b13358110 100644 --- a/.github/workflows/docs_deploy.yml +++ b/.github/workflows/docs_deploy.yml @@ -4,26 +4,25 @@ on: push: tags: ["v*.*.*"] workflow_dispatch: - pull_request: # Limit to a single workflow concurrency: "deploy-to-prod" jobs: -# chainloop_init: -# name: Chainloop Init -# uses: chainloop-dev/labs/.github/workflows/chainloop_init.yml@64839eb68c20fefda46929c6c6e893cdf0537619 -# secrets: -# api_token: ${{ secrets.CHAINLOOP_TOKEN }} -# with: -# workflow_name: "chainloop-docs-release" -# project_name: "chainloop" + chainloop_init: + name: Chainloop Init + uses: chainloop-dev/labs/.github/workflows/chainloop_init.yml@64839eb68c20fefda46929c6c6e893cdf0537619 + secrets: + api_token: ${{ secrets.CHAINLOOP_TOKEN }} + with: + workflow_name: "chainloop-docs-release" + project_name: "chainloop" deploy_docs: name: Deploy Documentation runs-on: ubuntu-latest -# needs: -# - chainloop_init + needs: + - chainloop_init defaults: run: working-directory: ./docs @@ -46,26 +45,23 @@ jobs: - name: yarn install run: yarn install -# - name: Build -# run: netlify build -# -# - name: Deploy -# run: netlify deploy --prod + - name: Build + run: netlify build + + - name: Deploy + run: netlify deploy --prod - name: Generate reports run: | mkdir -p reports -# tar -czf reports/build.tar.gz build + tar -czf reports/build.tar.gz build - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 - env: - RUNNER_DEBUG: "1" - ACTIONS_STEP_DEBUG: true with: path: . format: cyclonedx-json upload-artifact: false -# config: docs/.syft.yaml + config: docs/.syft.yaml output-file: docs/reports/sbom.cyclonedx.json - uses: anchore/sbom-action@a5afbb185c4d9799c758f05e496032af75ae9128 @@ -86,13 +82,13 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} -# chainloop_push: -# name: Chainloop Push -# uses: chainloop-dev/labs/.github/workflows/chainloop_push.yml@25c77318e739c60e86d3dfe7e864f51c665972dd -# needs: -# - deploy_docs -# secrets: -# api_token: ${{ secrets.CHAINLOOP_TOKEN }} -# with: -# attestation_name: "docs" -# workflow_name: "chainloop-docs-release" + chainloop_push: + name: Chainloop Push + uses: chainloop-dev/labs/.github/workflows/chainloop_push.yml@25c77318e739c60e86d3dfe7e864f51c665972dd + needs: + - deploy_docs + secrets: + api_token: ${{ secrets.CHAINLOOP_TOKEN }} + with: + attestation_name: "docs" + workflow_name: "chainloop-docs-release"