Skip to content

Merge pull request #5 from insight-platform/4-wait-keyframe #75

Merge pull request #5 from insight-platform/4-wait-keyframe

Merge pull request #5 from insight-platform/4-wait-keyframe #75

Workflow file for this run

name: Docker
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
jobs:
linux:
runs-on:
- self-hosted
- ${{ matrix.runner }}
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
include:
- docker_file: Dockerfile
name: replay-arm64
arch: linux/arm64
tag: ghcr.io/insight-platform/replay-arm64
runner: ARM64
- docker_file: Dockerfile
name: replay-x86
arch: linux/amd64
tag: ghcr.io/insight-platform/replay-x86
runner: X64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4.4.1
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1
with:
cosign-release: 'v2.1.1'
# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Build docker image for ${{ env.GITHUB_REF_SLUG }}
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5 # v5.0.0
with:
file: ${{ matrix.docker_file }}
platforms: ${{ matrix.arch }}
tags: "${{matrix.tag}}:${{ env.GITHUB_REF_SLUG }}"
load: true
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3 # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push docker image for ${{ env.GITHUB_REF_SLUG }}
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5 # v5.0.0
with:
file: ${{ matrix.docker_file }}
platforms: ${{ matrix.arch }}
tags: "${{matrix.tag}}:${{ env.GITHUB_REF_SLUG }}"
push: true
context: .
cache-from: type=gha
cache-to: type=gha,mode=max