From 7695f9646be3199cb364fdeba07cbb466f0d70a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 09:59:44 +0200 Subject: [PATCH 01/36] refactor project --- .github/workflows/release.yml | 62 +++-------------------------------- 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c309cbf4..6890c89c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,63 +1,9 @@ -name: Creating Release - +name: Creating release +run-name: ${{ github.actor }} creating a release on: pull_request: types: [closed] jobs: - release: - if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install dependencies and build - run: npm ci && npm run build - - - name: 'Get latest release tag' - id: latest_release - run: | - current_version=`gh release list --limit 30 | grep Latest | awk '{ print $1;}'` - if [ -z "$current_version" ] - then - echo "No release found" - echo "Creating tag for firt release" - echo "version=v1.0.0" >> $GITHUB_ENV - else - echo "version=${current_version}" >> $GITHUB_ENV - fi - env: - GH_TOKEN: ${{ github.token }} - - - name: Display version - run: | - # Display the version from the environment - echo "Latest Version: ${{ env.version }}" - - - id: label - uses: zwaldowski/match-label-action@v4 - with: - allowed: major,minor,patch - default_match: none - - - uses: actions-ecosystem/action-bump-semver@v1 - if: ${{ steps.label.outputs.match != 'none' }} - id: bump-semver - with: - current_version: ${{ env.version }} - level: ${{steps.label.outputs.match}} - - - name: 'Creating Release' - if: ${{ steps.label.outputs.match != 'none' }} - run: | - gh release create ${{ steps.bump-semver.outputs.new_version }} --title " ${{ steps.bump-semver.outputs.new_version }}" --generate-notes - env: - GH_TOKEN: ${{ github.token }} - - - uses: JasonEtco/build-and-tag-action@v2 - if: ${{ steps.label.outputs.match != 'none' }} - env: - GITHUB_TOKEN: ${{ github.token }} - with: - tag_name: ${{ steps.bump-semver.outputs.new_version }} + call-release-workflow: + uses: omegapoint/cydig-reusable-workflows/.github/workflows/release.yml@main From 500f7e1c74cb3e1cdca9d073a3e33e016b1493cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 10:39:06 +0200 Subject: [PATCH 02/36] refactor project --- .github/workflows/test.yml | 69 +++++++++++++++++++++++++++++++++++--- package.json | 5 ++- 2 files changed, 66 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54a489dc..2f0dc34c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,18 +5,77 @@ permissions: pages: write id-token: write -on: [push] +on: [pull_request] jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout action + - name: Checkout Upload action uses: actions/checkout@v3 + - name: Checkout compliance action + uses: actions/checkout@v4 + with: + repository: Omegapoint/cydig-compliance-action + path: compliance-action + - name: Checkout compliance action + uses: actions/checkout@v4 + with: + repository: Omegapoint/cydig-azure-compliance-action + path: azure-compliance-action - name: Setup node uses: actions/setup-node@v3 - - name: Install dependencies + + - name: Install upload action dependencies run: npm ci - - name: Run tests + - name: Install compliance action dependencies + run: | + cd compliance-action + npm ci + - name: Install azure compliance action dependencies + run: | + cd azure-compliance-action + npm ci + + - name: Run upload tests run: npm run test - - name: Compile to Javascript + - name: Run compliance tests + run : | + cd compliance-action + npm run test + - name: Run azure compliance tests + run : | + cd azure-compliance-action + npm run test + + - name: Build Upload action run: npm run build + - name: Build compliance action + run: | + cd compliance-action + npm run build + - name: Build azure compliance action + run: | + cd azure-compliance-action + npm run build + + - name: 'Az CLI login' + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID_DEV }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + - name: 'Run Azure Compliance Controls' + uses: ./azure-compliance-action + with: + subscription: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + - name: 'Run Compliance Controls' + uses: ./compliance-action + with: + cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + PAT-token: ${{ secrets.MY_GITHUB_PAT}} + - name: 'Run Upload Action' + uses: ./ + with: + cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + PAT-token: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + \ No newline at end of file diff --git a/package.json b/package.json index d986e2bb..530672c8 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,8 @@ "main": "dist/index.js", "scripts": { "build": "ncc build src/index.ts", - "buildTest": "tsc", - "test": "npm run buildTest && mocha dist/tests/", - "testScript": "npm run build && mocha dist/tests/ --reporter xunit --reporter-option output=ResultsFile.xml", + "test": "tsc && mocha dist/tests/", + "testScript": "tsc && mocha dist/tests/ --reporter xunit --reporter-option output=ResultsFile.xml", "prepare": "husky install", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --fix --ext .ts", From f4ef1e67f4fbab4b4c4d41c93e02b49c1bc7ad61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 10:46:13 +0200 Subject: [PATCH 03/36] refactor project --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f0dc34c..b895fac4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,8 @@ name: Test run-name: ${{ github.actor }} is running tests permissions: - contents: write - pages: write + contents: read + pages: read id-token: write on: [pull_request] @@ -71,7 +71,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + cydigConfigPath: ./src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./ From 503f3b38f5d54448091c0d905209af7034ce7cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 10:48:57 +0200 Subject: [PATCH 04/36] refactor project --- .github/workflows/test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b895fac4..f7bdeac3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,25 +38,25 @@ jobs: - name: Run upload tests run: npm run test - - name: Run compliance tests - run : | - cd compliance-action - npm run test - name: Run azure compliance tests run : | cd azure-compliance-action npm run test + - name: Run compliance tests + run : | + cd compliance-action + npm run test - name: Build Upload action run: npm run build - - name: Build compliance action - run: | - cd compliance-action - npm run build - name: Build azure compliance action run: | cd azure-compliance-action npm run build + - name: Build compliance action + run: | + cd compliance-action + npm run build - name: 'Az CLI login' uses: azure/login@v1 @@ -71,7 +71,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ./src/cydigconfig.json + cydigConfigPath: src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./ From eff86668b9536ebd5152687dde60ad381747c7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 10:55:06 +0200 Subject: [PATCH 05/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7bdeac3..65c1e9b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: src/cydigconfig.json + cydigConfigPath: ../src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./ From 4b58fedbaf09bdbe9f6dc473b1da8903eb43abbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:00:13 +0200 Subject: [PATCH 06/36] refactor project --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65c1e9b2..9e0a4022 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Upload action - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + path: upload-action - name: Checkout compliance action uses: actions/checkout@v4 with: @@ -71,11 +73,11 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ../src/cydigconfig.json + cydigConfigPath: upload-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' - uses: ./ + uses: ./upload-action with: - cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + cydigConfigPath: upload-action/src/cydigconfig.json PAT-token: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From be21318d0d929d17717280b1f5468e6250739630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:02:02 +0200 Subject: [PATCH 07/36] refactor project --- .github/workflows/test.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e0a4022..2a8efe3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,21 +14,23 @@ jobs: uses: actions/checkout@v4 with: path: upload-action - - name: Checkout compliance action + - name: Checkout Azure compliance action uses: actions/checkout@v4 with: - repository: Omegapoint/cydig-compliance-action - path: compliance-action + repository: Omegapoint/cydig-azure-compliance-action + path: azure-compliance-action - name: Checkout compliance action uses: actions/checkout@v4 with: - repository: Omegapoint/cydig-azure-compliance-action - path: azure-compliance-action + repository: Omegapoint/cydig-compliance-action + path: compliance-action - name: Setup node uses: actions/setup-node@v3 - name: Install upload action dependencies - run: npm ci + run: | + cd upload-action + npm ci - name: Install compliance action dependencies run: | cd compliance-action @@ -39,7 +41,9 @@ jobs: npm ci - name: Run upload tests - run: npm run test + run: | + cd upload-action + npm run test - name: Run azure compliance tests run : | cd azure-compliance-action @@ -50,7 +54,9 @@ jobs: npm run test - name: Build Upload action - run: npm run build + run: | + cd upload-action + npm run build - name: Build azure compliance action run: | cd azure-compliance-action From 48fd5fc8fb5fc517313751679b1561f6742b92ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:03:52 +0200 Subject: [PATCH 08/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a8efe3b..2f26b02e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: upload-action/src/cydigconfig.json + cydigConfigPath: ../upload-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./upload-action From 78615d413a4557b509cbab1a7ec4d85579b1db04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:06:58 +0200 Subject: [PATCH 09/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f26b02e..6b834703 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ../upload-action/src/cydigconfig.json + cydigConfigPath: src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./upload-action From 8f19b085d7b808e1d03ff3c1ecac21603edf47ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:08:59 +0200 Subject: [PATCH 10/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b834703..0238636b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: src/cydigconfig.json + cydigConfigPath: ../src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./upload-action From 927bd6d3a96e715a46414f80fb88bfa5ab35fb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:19:33 +0200 Subject: [PATCH 11/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0238636b..5b476e0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ../src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./upload-action From 313eb689d6676124c5b7250ef4585fe1974670d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:22:03 +0200 Subject: [PATCH 12/36] refactor project --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b476e0c..9d4a9c4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,11 +79,11 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./upload-action with: - cydigConfigPath: upload-action/src/cydigconfig.json - PAT-token: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json + subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 1c753024ec48178091fbea310541ad27f1908f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:24:21 +0200 Subject: [PATCH 13/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d4a9c4c..eb1631b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT}} - name: 'Run Upload Action' uses: ./upload-action From 9f0014e7ca64d5fd5ff9ce8db10d1bfe92c33bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:26:09 +0200 Subject: [PATCH 14/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb1631b3..607bf6ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,6 +84,6 @@ jobs: - name: 'Run Upload Action' uses: ./upload-action with: - cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From ce1ea4c89bdf67b07bc01294122c3c75f449f769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:28:10 +0200 Subject: [PATCH 15/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 607bf6ee..8e23313f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,6 +84,6 @@ jobs: - name: 'Run Upload Action' uses: ./upload-action with: - cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + cydigConfigPath: ..src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From d4b5ca7c05385b4d59f5d2db149e63b656d1c6cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:28:50 +0200 Subject: [PATCH 16/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e23313f..563ca638 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,6 +84,6 @@ jobs: - name: 'Run Upload Action' uses: ./upload-action with: - cydigConfigPath: ..src/cydigconfig.json + cydigConfigPath: ../upload-action/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 7182a0e08de98adbdb83ce5583d893d67cae02b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:35:17 +0200 Subject: [PATCH 17/36] refactor project --- .github/workflows/test.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 563ca638..e215b58a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,8 +12,6 @@ jobs: steps: - name: Checkout Upload action uses: actions/checkout@v4 - with: - path: upload-action - name: Checkout Azure compliance action uses: actions/checkout@v4 with: @@ -28,9 +26,7 @@ jobs: uses: actions/setup-node@v3 - name: Install upload action dependencies - run: | - cd upload-action - npm ci + run: npm ci - name: Install compliance action dependencies run: | cd compliance-action @@ -41,9 +37,7 @@ jobs: npm ci - name: Run upload tests - run: | - cd upload-action - npm run test + run: npm run test - name: Run azure compliance tests run : | cd azure-compliance-action @@ -54,9 +48,7 @@ jobs: npm run test - name: Build Upload action - run: | - cd upload-action - npm run build + run: npm run build - name: Build azure compliance action run: | cd azure-compliance-action @@ -80,10 +72,10 @@ jobs: uses: ./compliance-action with: cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json - PAT-token: ${{ secrets.MY_GITHUB_PAT}} + PAT-token: ${{ secrets.MY_GITHUB_PAT }} - name: 'Run Upload Action' - uses: ./upload-action + uses: ./ with: - cydigConfigPath: ../upload-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 3d14c88d5671b9c89598b03663c02874f26bf6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 11:37:17 +0200 Subject: [PATCH 18/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e215b58a..acc71e27 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,6 +76,6 @@ jobs: - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + cydigConfigPath: src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From ca2a228b6d2c0b841baf4b92a114f8c5e89af8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:19:58 +0200 Subject: [PATCH 19/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acc71e27..51b0dd66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,7 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json + cydigConfigPath: ../${{ github.workspace }}/compliance-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT }} - name: 'Run Upload Action' uses: ./ From 5e2a436cf5992482fa5bf0b32c5c4d7fb45cf12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:22:44 +0200 Subject: [PATCH 20/36] refactor project --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51b0dd66..d9ce0c4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,11 +71,11 @@ jobs: - name: 'Run Compliance Controls' uses: ./compliance-action with: - cydigConfigPath: ../${{ github.workspace }}/compliance-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT }} - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: src/cydigconfig.json + cydigConfigPath: ../${{ github.workspace }}/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 9ffb9d4be27dceca7af4511a20f12e80bca9a3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:25:07 +0200 Subject: [PATCH 21/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9ce0c4e..c5e3ccd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,6 +76,6 @@ jobs: - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: ../${{ github.workspace }}/src/cydigconfig.json + cydigConfigPath: ../src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 0adddf4ca80369b26fc75a17181db0a38c438a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:29:40 +0200 Subject: [PATCH 22/36] refactor project --- .github/workflows/test.yml | 39 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5e3ccd8..46e85971 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: path: compliance-action - name: Setup node uses: actions/setup-node@v3 - + - name: Install upload action dependencies run: npm ci - name: Install compliance action dependencies @@ -58,24 +58,29 @@ jobs: cd compliance-action npm run build - - name: 'Az CLI login' - uses: azure/login@v1 - with: - client-id: ${{ secrets.AZURE_CLIENT_ID_DEV }} - tenant-id: ${{ secrets.AZURE_TENANT_ID }} - subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} - - name: 'Run Azure Compliance Controls' - uses: ./azure-compliance-action - with: - subscription: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} - - name: 'Run Compliance Controls' - uses: ./compliance-action - with: - cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json - PAT-token: ${{ secrets.MY_GITHUB_PAT }} + # - name: 'Az CLI login' + # uses: azure/login@v1 + # with: + # client-id: ${{ secrets.AZURE_CLIENT_ID_DEV }} + # tenant-id: ${{ secrets.AZURE_TENANT_ID }} + # subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + # - name: 'Run Azure Compliance Controls' + # uses: ./azure-compliance-action + # with: + # subscription: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + # - name: 'Run Compliance Controls' + # uses: ./compliance-action + # with: + # cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json + # PAT-token: ${{ secrets.MY_GITHUB_PAT }} + + - name: display path + run: | + ls + - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: ../src/cydigconfig.json + cydigConfigPath: ./compliance-action/upload-action/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 7dbfca3613a65e1de107cbc89b704cf99f54442c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:34:43 +0200 Subject: [PATCH 23/36] refactor project --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46e85971..f338b0ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,10 +77,11 @@ jobs: - name: display path run: | ls - + cd src + ls - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: ./compliance-action/upload-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From aedfa6829dde1b4daaf02c82d1cab33810db1e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:39:04 +0200 Subject: [PATCH 24/36] refactor project --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f338b0ac..0af158c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,12 +76,11 @@ jobs: - name: display path run: | - ls cd src ls - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + cydigConfigPath: /home/runner/work/cydig-upload-compliance-action/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From ab49d95a373b8efe3fb341e801018c2e4f2959e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:42:13 +0200 Subject: [PATCH 25/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0af158c1..586e62dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,6 +81,6 @@ jobs: - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: /home/runner/work/cydig-upload-compliance-action/src/cydigconfig.json + cydigConfigPath: cydig-upload-compliance-action/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From f00e25ed75b37f9f5ff0b5ff48df9eb56462b112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:47:26 +0200 Subject: [PATCH 26/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 586e62dc..a8d9715f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,6 +81,6 @@ jobs: - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: cydig-upload-compliance-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From c8223b08137ace7d8d167534cf582390e44eaeb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:58:18 +0200 Subject: [PATCH 27/36] refactor project --- .github/workflows/test.yml | 43 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8d9715f..3db1f842 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout Upload action uses: actions/checkout@v4 + with: + path: upload-action - name: Checkout Azure compliance action uses: actions/checkout@v4 with: @@ -36,27 +38,29 @@ jobs: cd azure-compliance-action npm ci - - name: Run upload tests - run: npm run test - - name: Run azure compliance tests - run : | - cd azure-compliance-action - npm run test - - name: Run compliance tests - run : | - cd compliance-action - npm run test + # - name: Run upload tests + # run: npm run test + # - name: Run azure compliance tests + # run : | + # cd azure-compliance-action + # npm run test + # - name: Run compliance tests + # run : | + # cd compliance-action + # npm run test - name: Build Upload action - run: npm run build - - name: Build azure compliance action - run: | - cd azure-compliance-action - npm run build - - name: Build compliance action run: | - cd compliance-action + cd upload-action npm run build + # - name: Build azure compliance action + # run: | + # cd azure-compliance-action + # npm run build + # - name: Build compliance action + # run: | + # cd compliance-action + # npm run build # - name: 'Az CLI login' # uses: azure/login@v1 @@ -76,11 +80,12 @@ jobs: - name: display path run: | - cd src + echo ${{ github.workspace }} + cd upload-action ls - name: 'Run Upload Action' uses: ./ with: - cydigConfigPath: ${{ github.workspace }}/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 3ebb9adb34752f9445ccc6068148806b0fa3cfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 13:59:13 +0200 Subject: [PATCH 28/36] refactor project --- .github/workflows/test.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3db1f842..44a21a37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,15 +28,17 @@ jobs: uses: actions/setup-node@v3 - name: Install upload action dependencies - run: npm ci - - name: Install compliance action dependencies run: | - cd compliance-action - npm ci - - name: Install azure compliance action dependencies - run: | - cd azure-compliance-action + cd upload-action npm ci + # - name: Install compliance action dependencies + # run: | + # cd compliance-action + # npm ci + # - name: Install azure compliance action dependencies + # run: | + # cd azure-compliance-action + # npm ci # - name: Run upload tests # run: npm run test From 346525d95fc7e096544acb2d4b36e306b99e5a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 14:01:17 +0200 Subject: [PATCH 29/36] refactor project --- .github/workflows/test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44a21a37..f776e8a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,15 +79,17 @@ jobs: # with: # cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json # PAT-token: ${{ secrets.MY_GITHUB_PAT }} - + - name: display OG path + run: | + ls - name: display path run: | echo ${{ github.workspace }} cd upload-action ls - name: 'Run Upload Action' - uses: ./ + uses: ./upload-action with: - cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json + cydigConfigPath: ./upload-action/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 35d107c9bd038ebed1efa06ec7d062822e02d51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 14:02:13 +0200 Subject: [PATCH 30/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f776e8a7..9d5c139f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,6 +90,6 @@ jobs: - name: 'Run Upload Action' uses: ./upload-action with: - cydigConfigPath: ./upload-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 029f7d7a6cab54d17f45ebf0072248fc5670b5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 14:03:08 +0200 Subject: [PATCH 31/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d5c139f..128bb016 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,6 +90,6 @@ jobs: - name: 'Run Upload Action' uses: ./upload-action with: - cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigconfig.json + cydigConfigPath: ${{ github.workspace }}/upload-action/src/cydigConfig.json subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} \ No newline at end of file From 6b9ef41b65b68f91ea9ec162b667a9ebefdf56d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Mon, 2 Oct 2023 14:04:43 +0200 Subject: [PATCH 32/36] refactor project --- .github/workflows/test.yml | 90 ++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 48 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 128bb016..592f7efb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,62 +31,56 @@ jobs: run: | cd upload-action npm ci - # - name: Install compliance action dependencies - # run: | - # cd compliance-action - # npm ci - # - name: Install azure compliance action dependencies - # run: | - # cd azure-compliance-action - # npm ci + - name: Install compliance action dependencies + run: | + cd compliance-action + npm ci + - name: Install azure compliance action dependencies + run: | + cd azure-compliance-action + npm ci - # - name: Run upload tests - # run: npm run test - # - name: Run azure compliance tests - # run : | - # cd azure-compliance-action - # npm run test - # - name: Run compliance tests - # run : | - # cd compliance-action - # npm run test + - name: Run upload tests + run: | + cd upload-action + npm run test + - name: Run azure compliance tests + run : | + cd azure-compliance-action + npm run test + - name: Run compliance tests + run : | + cd compliance-action + npm run test - name: Build Upload action run: | cd upload-action npm run build - # - name: Build azure compliance action - # run: | - # cd azure-compliance-action - # npm run build - # - name: Build compliance action - # run: | - # cd compliance-action - # npm run build - - # - name: 'Az CLI login' - # uses: azure/login@v1 - # with: - # client-id: ${{ secrets.AZURE_CLIENT_ID_DEV }} - # tenant-id: ${{ secrets.AZURE_TENANT_ID }} - # subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} - # - name: 'Run Azure Compliance Controls' - # uses: ./azure-compliance-action - # with: - # subscription: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} - # - name: 'Run Compliance Controls' - # uses: ./compliance-action - # with: - # cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json - # PAT-token: ${{ secrets.MY_GITHUB_PAT }} - - name: display OG path + - name: Build azure compliance action run: | - ls - - name: display path + cd azure-compliance-action + npm run build + - name: Build compliance action run: | - echo ${{ github.workspace }} - cd upload-action - ls + cd compliance-action + npm run build + + - name: 'Az CLI login' + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID_DEV }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + - name: 'Run Azure Compliance Controls' + uses: ./azure-compliance-action + with: + subscription: ${{ secrets.AZURE_SUBSCRIPTION_ID_DEV }} + - name: 'Run Compliance Controls' + uses: ./compliance-action + with: + cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json + PAT-token: ${{ secrets.MY_GITHUB_PAT }} - name: 'Run Upload Action' uses: ./upload-action with: From 9ff8d94962024b63dd8f3099f1a3a7424f51bc60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Tue, 3 Oct 2023 10:04:23 +0200 Subject: [PATCH 33/36] refactor project --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 592f7efb..972d6a8c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,6 +81,11 @@ jobs: with: cydigConfigPath: ${{ github.workspace }}/compliance-action/src/cydigconfig.json PAT-token: ${{ secrets.MY_GITHUB_PAT }} + + - name: Set dev func URL + run: | + echo "urlUpdate=${{ vars.URLUPDATECOMPLIANCESTATE }}" >> $GITHUB_ENV + - name: 'Run Upload Action' uses: ./upload-action with: From fd476f26226a0292d47a0dc571b74b6d9fc8ef56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Tue, 3 Oct 2023 10:24:10 +0200 Subject: [PATCH 34/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 972d6a8c..1985421f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,7 +84,7 @@ jobs: - name: Set dev func URL run: | - echo "urlUpdate=${{ vars.URLUPDATECOMPLIANCESTATE }}" >> $GITHUB_ENV + echo "urlUpdate=${{ secrets.ULR_UPLOAD_DEV }}" >> $GITHUB_ENV - name: 'Run Upload Action' uses: ./upload-action From 896341262cb2ce482763ef9d57ed83c015fddc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Tue, 3 Oct 2023 10:43:52 +0200 Subject: [PATCH 35/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1985421f..ffb1f074 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test +name: test all actions run-name: ${{ github.actor }} is running tests permissions: contents: read From 7f3db3530999170c108b8389df169738446ee61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Tue, 3 Oct 2023 10:47:56 +0200 Subject: [PATCH 36/36] refactor project --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ffb1f074..af4b410e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test all actions +name: Test all actions run-name: ${{ github.actor }} is running tests permissions: contents: read