chore(deps): Bump ubuntu from jammy-20240427 to jammy-20240530 in /iron #61
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 | |
- iron | |
steps: | |
- name: Free Up GitHub Actions Ubuntu Runner Disk Space | |
uses: hirnidrin/free-disk-space@main | |
# uses: jlumbroso/free-disk-space@main | |
with: | |
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB | |
tool-cache: false | |
# All of these default to true, but feel free to set to "false" if necessary for your workflow | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: false | |
swap-storage: true | |
- 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 |