chore(deps): Bump ubuntu from jammy-20230308 to jammy-20230425 in /humble #45
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 Test | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- 'LICENSE' | |
- '.github/workflows/deploy.yml' | |
env: | |
DOCKER_USERNAME: tiryoh | |
DOCKER_IMAGENAME: ros2 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ros-distro: | |
- crystal | |
- dashing | |
- eloquent | |
- foxy | |
- galactic | |
- humble | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Prepare Docker metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGENAME }} | |
tags: | | |
type=raw,value=${{ matrix.ros-distro }} | |
flavor: | | |
latest=false | |
prefix= | |
suffix= | |
- name: Build (amd64) | |
id: docker-amd64 | |
uses: docker/build-push-action@v2 | |
with: | |
context: ${{ matrix.ros-distro }} | |
platforms: linux/amd64 | |
# outputs: type=registry # same as --push, push: true | |
load: true | |
tags: '${{ steps.meta.outputs.tags }}-amd64' | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Build (arm64) | |
id: docker-arm64 | |
uses: docker/build-push-action@v2 | |
with: | |
context: ${{ matrix.ros-distro }} | |
platforms: linux/arm64 | |
# outputs: type=registry # same as --push, push: true | |
load: true | |
tags: '${{ steps.meta.outputs.tags }}-arm64' | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- # Temp fix | |
# https://github.com/docker/build-push-action/issues/252 | |
# https://github.com/moby/buildkit/issues/1896 | |
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md | |
name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: '${{ steps.meta.outputs.tags }}-amd64' | |
exit-code: '0' | |
vuln-type: 'os,library' | |
severity: 'CRITICAL,HIGH' | |
format: 'template' | |
template: '@/contrib/sarif.tpl' | |
output: 'trivy-results.sarif' | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: 'trivy-results.sarif' | |
wait-for-processing: true |