Update https://github.com/moodle/moodle digest to fb7872a #297
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: 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@b4ffde65f46336ab88eb53be808477a3936bae11 # 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/[email protected] | |
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 |