-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (54 loc) · 2.04 KB
/
test-make.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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'
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
- 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@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"