Skip to content

Commit

Permalink
Switch to using a composite action instead
Browse files Browse the repository at this point in the history
There are few issues with a Docker container action.
For example, the path to the Azure Container Scan report is an absolute path in the workspace, but when using a Docker container action, the workspace is mounted in a '/github/workspace' folder, making it too complicated to reuse the path. This would require transforming the Container Scan output path so it can be used from within the container.
  • Loading branch information
rm3l committed Nov 3, 2021
1 parent 866fb06 commit e33ab5c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

23 changes: 17 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,21 @@ inputs:
outputs:
sarif-report-path:
description: 'Path to the SARIF report generated. Relative to the GitHub workspace'
value: ${{ steps.scan-to-sarif.outputs.sarif-report-path }}
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.converter-version }}
- ${{ inputs.input-file }}
- ${{ inputs.output-file }}
using: "composite"
steps:
- id: container-scan-to-sarif-downloader
run: |
mkdir -p ~/.local/bin
curl -L "https://github.com/rm3l/container-scan-to-sarif/releases/download/${{ inputs.converter-version }}/container-scan-to-sarif_${{ inputs.converter-version }}_Linux_x86_64.tar.gz" \
| tar zx -C ~/.local/bin
chmod +x ~/.local/bin/container-scan-to-sarif
shell: bash
- id: scan-to-sarif
run: |
~/.local/bin/container-scan-to-sarif \
-input "${{ inputs.input-file }}" \
-output "${{ inputs.output-file }}"
echo "::set-output name=sarif-report-path::${{ inputs.output-file }}"
shell: bash
13 changes: 0 additions & 13 deletions entrypoint.sh

This file was deleted.

0 comments on commit e33ab5c

Please sign in to comment.