OPSEXP-2916: Add ACS audit component image build #132
Workflow file for this run
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 building using the make wrapper | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'Makefile' | |
- '.github/workflows/test-make.yml' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'Makefile' | |
- '.github/workflows/test-make.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
MAKE_TARGET: ${{ github.event.pull_request.head.repo.fork && 'community' || 'all_ci' }} | |
jobs: | |
make-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | |
- name: Setup nexus authentication | |
if: '! github.event.pull_request.head.repo.fork' | |
run: | | |
echo "machine nexus.alfresco.com" >> ~/.netrc | |
echo "login ${{ secrets.NEXUS_USERNAME }}" >> ~/.netrc | |
echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Make Docker images | |
id: make | |
run: | | |
make ${{ env.MAKE_TARGET }} | |
- name: Check Images are loaded | |
run: | | |
echo -n "Checking images are loaded in local Docker Engine..." | |
docker images --format "{{.Repository}}:{{.Tag}}" | grep alfresco || { echo "No Alfresco image found"; exit 1; } | |
- name: Install Grype | |
uses: anchore/scan-action/download-grype@5ed195cc06065322983cae4bb31e2a751feb86fd # v5.2.0 | |
id: grype-install | |
- name: Add Grype to PATH | |
run: echo "$(dirname ${{ steps.grype-install.outputs.cmd }})" >> $GITHUB_PATH | |
- name: Grype scan | |
run: | | |
make grype GRYPE_TARGET="${{ env.MAKE_TARGET }}" GRYPE_OPTS="--only-fixed --ignore-states wont-fix" |