feat: uds-security-hub scan common action #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test security-hub-scan | |
on: | |
pull_request: ~ | |
jobs: | |
run-test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
# run setup to get uds to use zarf | |
- name: Environment setup | |
uses: ./.github/actions/setup | |
- name: build example package | |
id: setup | |
run: | | |
uds run create-nginx-package --no-progress | |
PACKAGE_NAME=$(cat zarf.yaml | uds zarf tools yq .metadata.name) | |
PACKAGE_VERSION=$(cat zarf.yaml | uds zarf tools yq .metadata.version) | |
echo "path=zarf-package-${PACKAGE_NAME}-${UDS_ARCH}-${PACKAGE_VERSION}.tar.zst" >> "$GITHUB_OUTPUT" | |
shell: bash | |
- name: run scan | |
id: scan | |
uses: ./.github/actions/security-hub-scan | |
with: | |
path: ${{ steps.setup.outputs.path }} |