Skip to content

chore(deps): bump the maven-dependencies group across 1 directory with 3 updates #39

chore(deps): bump the maven-dependencies group across 1 directory with 3 updates

chore(deps): bump the maven-dependencies group across 1 directory with 3 updates #39

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
warm-cache:
name: Warm Dependencies Cache
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the GitHub Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT }}
- name: Build dependencies stage
uses: docker/build-push-action@v6
with:
context: .
file: ./src/main/docker/Dockerfile.native
target: dependencies
platforms: linux/amd64
push: ${{ github.event_name == 'push' }}
cache-from: |
type=gha,scope=deps
type=registry,ref=ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:deps-cache
cache-to: |
type=gha,mode=max,scope=deps
${{ github.event_name == 'push' && format('type=registry,ref=ghcr.io/{0}/podmortem-log-parser:deps-cache,mode=max', github.repository_owner) || '' }}
tags: |
${{ github.event_name == 'push' && format('ghcr.io/{0}/podmortem-log-parser:deps-cache', github.repository_owner) || '' }}
build-args: |
GITHUB_USER=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
test-build:
name: Test Build
if: github.event_name == 'pull_request'
needs: warm-cache
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image for testing
uses: docker/build-push-action@v6
with:
context: .
file: ./src/main/docker/Dockerfile.native
platforms: linux/amd64
push: false
cache-from: |
type=gha,scope=deps
type=gha,scope=build-amd64
type=registry,ref=ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:deps-cache
cache-to: type=gha,mode=max,scope=build-amd64
build-args: |
GITHUB_USER=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
build-arch:
name: Build ${{ matrix.arch }}
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: warm-cache
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
arch: [amd64, arm64]
include:
- arch: amd64
platform: linux/amd64
- arch: arm64
platform: linux/arm64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT }}
- name: Build and push ${{ matrix.arch }} image
uses: docker/build-push-action@v6
with:
context: .
file: ./src/main/docker/Dockerfile.native
platforms: ${{ matrix.platform }}
push: true
cache-from: |
type=gha,scope=deps
type=gha,scope=build-${{ matrix.arch }}
type=registry,ref=ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:deps-cache
cache-to: type=gha,mode=max,scope=build-${{ matrix.arch }}
tags: |
ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:${{ github.sha }}-${{ matrix.arch }}
build-args: |
GITHUB_USER=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
create-manifest:
name: Create Multi-Arch Manifest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build-arch
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT }}
- name: Create and push multi-arch manifest
run: |
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:latest \
ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:${{ github.sha }}-amd64 \
ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:${{ github.sha }}-arm64
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:${{ github.sha }} \
ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:${{ github.sha }}-amd64 \
ghcr.io/${{ github.repository_owner }}/podmortem-log-parser:${{ github.sha }}-arm64