docker – Rev 62

Subversion Repositories:
Rev:
name: build

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
  contents: read

on:
  schedule:
    - cron: '0 8 */6 * *' # every 6 days to keep cache
  push:
    branches:
      - 'master'
    tags:
      - '*'
    paths-ignore:
      - '**.md'
  pull_request:
    paths-ignore:
      - '**.md'

jobs:
  build:
    uses: crazy-max/.github/.github/workflows/bake-distribute-mp.yml@0acc187b016a2946786f201397bbcfb2c530ffc7
    permissions:
      # same as global permissions
      contents: read
      # required to push to GHCR
      packages: write
    strategy:
      fail-fast: false
      matrix:
        include:
          -
            image: crazymax/rtorrent-rutorrent
            login-registry: docker.io
            login-username: crazymax
            login-secret-key: DOCKER_PASSWORD
          -
            image: ghcr.io/crazy-max/rtorrent-rutorrent
            login-registry: ghcr.io
            login-username: ${{ github.repository_owner }}
            login-secret-key: GITHUB_TOKEN
    with:
      target: image-all
      push: ${{ github.event_name != 'pull_request' }}
      cache: true
      cache-scope: build
      set-meta-labels: true
      meta-image: ${{ matrix.image }}
      meta-tags: |
        type=match,pattern=(.*)-r,group=1
        type=ref,event=pr
        type=edge
      meta-labels: |
        org.opencontainers.image.title=rTorrent and ruTorrent
        org.opencontainers.image.description=rTorrent and ruTorrent
        org.opencontainers.image.vendor=CrazyMax
      login-registry: ${{ matrix.login-registry }}
      login-username: ${{ matrix.login-username }}
    secrets:
      login-password: ${{ secrets[matrix.login-secret-key] }}