libretime/.github/workflows/container.yml

104 lines
3.0 KiB
YAML
Raw Permalink Normal View History

2022-09-08 12:52:00 +02:00
name: Container
on:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
branches: [main, stable-*]
2022-09-08 12:52:00 +02:00
pull_request:
branches: [main, stable-*]
2022-09-08 12:52:00 +02:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
2022-09-08 12:52:00 +02:00
jobs:
2023-02-26 15:18:10 +01:00
meta:
2022-09-08 12:52:00 +02:00
runs-on: ubuntu-latest
2023-02-26 15:18:10 +01:00
strategy:
matrix:
target: [analyzer, api, legacy, playout, worker]
if: ${{ github.repository_owner == 'libretime' }}
steps:
- uses: actions/checkout@v4
2023-02-26 15:18:10 +01:00
- name: Update Docker Hub description
if: github.event_name == 'push'
chore(deps): update peter-evans/dockerhub-description action to v4 (#2918) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [peter-evans/dockerhub-description](https://togithub.com/peter-evans/dockerhub-description) | action | major | `v3` -> `v4` | --- ### Release Notes <details> <summary>peter-evans/dockerhub-description (peter-evans/dockerhub-description)</summary> ### [`v4`](https://togithub.com/peter-evans/dockerhub-description/compare/v3...v4) [Compare Source](https://togithub.com/peter-evans/dockerhub-description/compare/v3...v4) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/libretime/libretime). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-30 18:22:28 +01:00
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: libretime/libretime-${{ matrix.target }}
readme-filepath: ./README.md
chore(deps): update docker/metadata-action action to v5.5.1 (#2928) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [docker/metadata-action](https://togithub.com/docker/metadata-action) | action | minor | `v5.4.0` -> `v5.5.1` | --- ### Release Notes <details> <summary>docker/metadata-action (docker/metadata-action)</summary> ### [`v5.5.1`](https://togithub.com/docker/metadata-action/releases/tag/v5.5.1) [Compare Source](https://togithub.com/docker/metadata-action/compare/v5.5.0...v5.5.1) - Don't set `cwd://` prefix for local bake files by [@&#8203;crazy-max](https://togithub.com/crazy-max) in [https://github.com/docker/metadata-action/pull/382](https://togithub.com/docker/metadata-action/pull/382) **Full Changelog**: https://github.com/docker/metadata-action/compare/v5.5.0...v5.5.1 ### [`v5.5.0`](https://togithub.com/docker/metadata-action/releases/tag/v5.5.0) [Compare Source](https://togithub.com/docker/metadata-action/compare/v5.4.0...v5.5.0) - Set `cwd://` prefix for bake files path by [@&#8203;crazy-max](https://togithub.com/crazy-max) in [https://github.com/docker/metadata-action/pull/370](https://togithub.com/docker/metadata-action/pull/370) - Bump [@&#8203;docker/actions-toolkit](https://togithub.com/docker/actions-toolkit) from 0.16.0 to 0.16.1 in [https://github.com/docker/metadata-action/pull/371](https://togithub.com/docker/metadata-action/pull/371) - Bump moment from 2.29.4 to 2.30.1 in [https://github.com/docker/metadata-action/pull/373](https://togithub.com/docker/metadata-action/pull/373) - Bump moment-timezone from 0.5.43 to 0.5.44 in [https://github.com/docker/metadata-action/pull/374](https://togithub.com/docker/metadata-action/pull/374) **Full Changelog**: https://github.com/docker/metadata-action/compare/v5.4.0...v5.5.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/libretime/libretime). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Kyle Robbertze <kyle@paddatrapper.com>
2024-02-01 17:23:04 +01:00
- uses: docker/metadata-action@v5
2023-02-26 15:18:10 +01:00
id: meta
with:
bake-target: ${{ matrix.target }}
images: |
ghcr.io/libretime/libretime-${{ matrix.target }}
docker.io/libretime/libretime-${{ matrix.target }}
2023-02-26 15:18:10 +01:00
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Upload metadata bake file
uses: actions/upload-artifact@v4
2023-02-26 15:18:10 +01:00
with:
name: meta-${{ matrix.target }}
path: ${{ steps.meta.outputs.bake-file }}
build:
needs: [meta]
runs-on: ubuntu-latest
2022-09-08 12:52:00 +02:00
if: ${{ github.repository_owner == 'libretime' }}
steps:
- uses: actions/checkout@v4
2022-09-08 12:52:00 +02:00
- uses: docker/setup-buildx-action@v3
2022-09-14 20:31:19 +02:00
2023-02-26 15:18:10 +01:00
- name: Login ghcr.io
if: github.event_name == 'push'
uses: docker/login-action@v3
2022-09-08 12:52:00 +02:00
with:
2023-02-26 15:18:10 +01:00
registry: ghcr.io
2022-09-08 12:52:00 +02:00
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login docker.io
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2023-02-26 15:18:10 +01:00
- name: Download all metadata bake files
uses: actions/download-artifact@v4
with:
pattern: meta-*
2023-02-26 15:18:10 +01:00
- name: Guess LIBRETIME_VERSION
run: |
make VERSION
echo "LIBRETIME_VERSION=$(cat VERSION | tr -d [:blank:])" >> $GITHUB_ENV
2023-02-26 15:18:10 +01:00
- name: Build
uses: docker/bake-action@v5
2022-09-14 20:31:19 +02:00
with:
pull: true
2023-02-26 15:18:10 +01:00
push: ${{ github.event_name == 'push' }}
files: |
docker-bake.json
meta-analyzer/docker-metadata-action-bake.json
meta-api/docker-metadata-action-bake.json
meta-legacy/docker-metadata-action-bake.json
meta-playout/docker-metadata-action-bake.json
meta-worker/docker-metadata-action-bake.json
set: |
*.cache-from=type=gha,scope=container
*.cache-to=type=gha,scope=container,mode=max
*.args.LIBRETIME_VERSION=${{ env.LIBRETIME_VERSION }}