Skip to content

Update https://github.com/moodle/moodle digest to f0c1a37 #334

Update https://github.com/moodle/moodle digest to f0c1a37

Update https://github.com/moodle/moodle digest to f0c1a37 #334

Workflow file for this run

name: Build and test PR
on:
pull_request:
branches: ["dev"]
env:
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-test-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Build and Test
run: |
export TEST_IMAGE_NAME=${{ env.IMAGE_NAME }}:${{ github.sha }}
docker compose --file docker-compose.test.yml up --exit-code-from sut -t 10 --build
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
- name: Try build multi-arch
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: ${{ env.IMAGE_NAME }}:${{ github.sha }}
platforms: ${{ vars.CONTAINER_ARCH }}
provenance: false
- name: Run Trivy vulnerability scanner for PR
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ env.IMAGE_NAME }}:${{ github.sha }}'
format: 'table'
severity: 'CRITICAL,HIGH'
exit-code: 0
- name: Run the Anchore scan action for PR
uses: anchore/scan-action@v3
id: anchore-scan-pr
with:
image: '${{ env.IMAGE_NAME }}:${{ github.sha }}'
output-format: table
fail-build: false