Skip to content

build(deps): bump cryptography from 46.0.5 to 46.0.6 in /patcher #467

build(deps): bump cryptography from 46.0.5 to 46.0.6 in /patcher

build(deps): bump cryptography from 46.0.5 to 46.0.6 in /patcher #467

Workflow file for this run

name: Docker Build and Push
on:
workflow_call:
inputs:
push:
required: false
type: boolean
default: false
suffix:
required: false
type: string
default: ""
release:
types: [created]
push:
branches: ["main"]
pull_request:
branches: ["main"]
types: [labeled, synchronize]
env:
REGISTRY: ghcr.io
BASE_IMAGE_NAME: ${{ github.repository }}/buttercup
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- component: orchestrator
dockerfile: ./orchestrator/Dockerfile
- component: fuzzer
dockerfile: ./fuzzer/Dockerfile
- component: patcher
dockerfile: ./patcher/Dockerfile
- component: seed-gen
dockerfile: ./seed-gen/Dockerfile
- component: program-model
dockerfile: ./program-model/Dockerfile
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: true
- name: Lint Dockerfile
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
with:
dockerfile: ${{ matrix.dockerfile }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to the Container registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.BASE_IMAGE_NAME }}-${{ matrix.component }}
tags: |
type=ref,event=branch,suffix=${{ inputs.suffix }}
type=ref,event=pr,suffix=${{ inputs.suffix }}
type=ref,event=tag,suffix=${{ inputs.suffix }}
type=semver,pattern={{version}},suffix=${{ inputs.suffix }}
type=semver,pattern={{major}}.{{minor}},suffix=${{ inputs.suffix }}
- name: Build and push Docker image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: .
file: ${{ matrix.dockerfile }}
push: ${{ (github.event_name != 'pull_request' || startsWith(github.head_ref, 'ci/') || inputs.push || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'docker-push'))) && 'true' || 'false' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
env:
DOCKER_BUILD_RECORD_RETENTION_DAYS: ${{ github.ref_type == 'tag' || github.event_name == 'release' && '0' || '7' }}