Skip to content

chore(deps): bump docker/build-push-action from 4 to 5 #55

chore(deps): bump docker/build-push-action from 4 to 5

chore(deps): bump docker/build-push-action from 4 to 5 #55

Workflow file for this run

---
name: discogsography
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 1 * * 6'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.actor }}/discogsography
jobs:
list-sub-projects:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Get all sub-projects.
id: set-matrix
run: echo "matrix=$(ls -d */ | sed -r 's/\///g' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
build-discogsography:
needs: list-sub-projects
runs-on: ubuntu-latest
strategy:
matrix:
sub-project: ${{ fromJson(needs.list-sub-projects.outputs.matrix) }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository.
uses: actions/checkout@v4
with:
submodules: true
- name: Log in to the GitHub Container Registry.
if: github.event_name != 'pull_request'
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Anchore security scan - discogsography/${{ matrix.sub-project }}.
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3
with:
path: ${{ matrix.sub-project }}
- name: Install uv
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Generate uv.lock for Docker build
run: uv sync --locked
- name: Extract metadata (tags, labels) for Docker.
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.sub-project }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=schedule,pattern={{date 'YYYYMMDD'}}
- name: Set up QEMU.
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
- name: Set up Docker Buildx.
uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2
with:
platforms: linux/amd64, linux/arm64
- name: Build and push Docker image to GitHub Container Registry - discogsography/${{ matrix.sub-project }}.
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v4
with:
context: ${{ matrix.sub-project }}
platforms: linux/amd64, linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: true
sbom: true
- name: Send notification to Discord.
uses: sarisia/actions-status-discord@82409b29f4bd859ae6d4b6b6ab8d7f7b9c4d7b66 # v1.12.0
if: always()
with:
title: discogsography/${{ matrix.sub-project }}
webhook: ${{ secrets.DISCORD_WEBHOOK }}