Always run test-make workflow on main #173
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 make | |
on: | |
push: | |
branches: | |
- main | |
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' | |
env: | |
NETRC_PATH: ~/.netrc | |
run: | | |
touch ${{ env.NETRC_PATH }} | |
chmod 600 ${{ env.NETRC_PATH }} | |
echo "machine nexus.alfresco.com" >> ${{ env.NETRC_PATH }} | |
echo "login ${{ secrets.NEXUS_USERNAME }}" >> ${{ env.NETRC_PATH }} | |
echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ${{ env.NETRC_PATH }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- 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@869c549e657a088dc0441b08ce4fc0ecdac2bb65 # v5.3.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" |