Skip to content

chore(deps): update trufflesecurity/trufflehog action to v3.72.0 #258

chore(deps): update trufflesecurity/trufflehog action to v3.72.0

chore(deps): update trufflesecurity/trufflehog action to v3.72.0 #258

name: Handle LLVM_runner docker image
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
check_changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
image_to_build: ${{ steps.set_output.outputs.image_to_build }}
steps:
- uses: actions/checkout@v4
- id: determine_changes
uses: tj-actions/changed-files@v41
with:
files_yaml: |
llvm_runner:
- "images/llvm_runner/Dockerfile"
llvm_runner_jammy:
- "images/llvm_runner/jammy.Dockerfile"
both:
- ".github/workflows/handle_llvm_runner_image.yml"
- id: set_output
run: |
if [ "${{ steps.determine_changes.outputs.llvm_runner_any_changed }}" == "true" ]; then
echo "image_to_build=llvm_runner" >> "$GITHUB_OUTPUT"
elif [ "${{ steps.determine_changes.outputs.llvm_runner_jammy_any_changed }}" == "true" ]; then
echo "image_to_build=llvm_runner_jammy" >> "$GITHUB_OUTPUT"
elif [ "${{ steps.determine_changes.outputs.both_any_changed }}" == "true" ]; then
echo "image_to_build=both" >> "$GITHUB_OUTPUT"
else
echo "image_to_build=none" >> "$GITHUB_OUTPUT"
fi
handle_image:
needs: check_changes
if: needs.check_changes.outputs.image_to_build != 'none'
runs-on: [matterlabs-ci-runner]
strategy:
matrix:
tag_prefix: ["", "ubuntu22-llvm15-"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set outputs
id: set_output
run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: 'linux/amd64,linux/arm64,linux/arm64/v8'
- name: Log in to Docker Hub
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and optionally push Docker image
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' }}
tags: |
matterlabs/llvm_runner:${{ matrix.tag_prefix }}${{ steps.set_output.outputs.sha_short }}
matterlabs/llvm_runner:${{ matrix.tag_prefix }}latest
file: images/llvm_runner/${{ matrix.tag_prefix == 'ubuntu22-llvm15-' && 'jammy.' || '' }}Dockerfile
platforms: 'linux/amd64,linux/arm64,linux/arm64/v8'