diff --git a/.github/workflows/build-and-push-docker-image.yaml b/.github/workflows/build-and-push-docker-image.yaml index 48c6d9f..f22d4b2 100644 --- a/.github/workflows/build-and-push-docker-image.yaml +++ b/.github/workflows/build-and-push-docker-image.yaml @@ -14,6 +14,7 @@ on: workflow_call: jobs: + build-and-push-image: runs-on: ubuntu-latest @@ -44,4 +45,42 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + + test-action: + runs-on: ubuntu-latest + needs: build-and-push-image + + permissions: + contents: read + packages: read + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Run threagile + id: threagile-test-optional-args + uses: pritchyspritch/run-threagile-action@v2 + with: + optional_args: '--help' + + - name: Run threagile + id: threagile + uses: pritchyspritch/run-threagile-action@v2 + with: + model_file: 'example-models/threagile-SSPHP-model.yaml' + output_dir: 'test/location' + + # will fail as Azure data ingestion hasn't been automated yet + - name: Run threagile + id: dfe-threagile + uses: pritchyspritch/run-threagile-action@v2 + with: + dfe_threagile: 'true' + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: threat-model-output + path: test/location \ No newline at end of file diff --git a/.github/workflows/update-threat-model.yaml b/.github/workflows/update-threat-model.yaml deleted file mode 100644 index 10e4f1a..0000000 --- a/.github/workflows/update-threat-model.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: Update Threat Model Outputs - -permissions: - actions: read - contents: read - -on: - push: - branches: - - 'main' - paths: - - 'example-models/threagile-SSPHP-model.yaml' - - '.github/workflows/update-threat-model.yaml' - workflow_dispatch: -jobs: - UpdateTM: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Run threagile - id: threagile-test-optional-args - uses: pritchyspritch/run-threagile-action@v2 - with: - optional_args: '--help' - - - name: Run threagile - id: threagile - uses: pritchyspritch/run-threagile-action@v2 - with: - model_file: 'example-models/threagile-SSPHP-model.yaml' - output_dir: 'test/location' - - # will fail as Azure data ingestion hasn't been automated yet - - name: Run threagile - id: dfe-threagile - uses: pritchyspritch/run-threagile-action@v2 - with: - dfe_threagile: 'true' - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: threat-model-output - path: test/location \ No newline at end of file