2020-10-19 00:24:00 +02:00
|
|
|
name: Docker
|
|
|
|
on:
|
|
|
|
schedule:
|
2020-10-20 02:56:30 +02:00
|
|
|
- cron: '0 1 * * *'
|
2020-10-19 00:24:00 +02:00
|
|
|
push:
|
|
|
|
tags:
|
2023-07-27 05:42:08 +02:00
|
|
|
- '[0-9]+.[0-9]+.[0-9]+'
|
2023-06-23 05:54:30 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
2020-10-19 00:24:00 +02:00
|
|
|
jobs:
|
2024-03-31 00:47:13 +01:00
|
|
|
docker-images:
|
|
|
|
name: Docker Images
|
2023-03-28 06:21:07 +02:00
|
|
|
permissions:
|
|
|
|
packages: write
|
2020-10-19 00:24:00 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-05 00:35:18 +02:00
|
|
|
uses: actions/checkout@v4
|
2020-10-20 05:25:15 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-10-19 00:24:00 +02:00
|
|
|
|
2024-03-31 00:47:13 +01:00
|
|
|
- name: Generate Alpine Docker tags
|
|
|
|
id: docker_alpine_tags
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: |
|
2023-03-24 15:13:40 +01:00
|
|
|
docker.io/${{ github.repository_owner }}/miniflux
|
|
|
|
ghcr.io/${{ github.repository_owner }}/miniflux
|
|
|
|
quay.io/${{ github.repository_owner }}/miniflux
|
2024-03-31 00:47:13 +01:00
|
|
|
tags: |
|
|
|
|
type=ref,event=pr
|
|
|
|
type=schedule,pattern=nightly
|
|
|
|
type=semver,pattern={{raw}}
|
2020-10-20 02:56:30 +02:00
|
|
|
|
2024-03-31 00:47:13 +01:00
|
|
|
- name: Generate Distroless Docker tags
|
|
|
|
id: docker_distroless_tags
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: |
|
2023-03-24 15:13:40 +01:00
|
|
|
docker.io/${{ github.repository_owner }}/miniflux
|
|
|
|
ghcr.io/${{ github.repository_owner }}/miniflux
|
|
|
|
quay.io/${{ github.repository_owner }}/miniflux
|
2024-03-31 00:47:13 +01:00
|
|
|
tags: |
|
2024-04-28 00:26:16 +02:00
|
|
|
type=ref,event=pr
|
|
|
|
type=schedule,pattern=nightly
|
|
|
|
type=semver,pattern={{raw}}
|
|
|
|
flavor: |
|
|
|
|
suffix=-distroless,onlatest=true
|
2022-03-16 06:39:16 +01:00
|
|
|
|
2020-10-19 00:24:00 +02:00
|
|
|
- name: Set up QEMU
|
2023-09-19 00:15:13 +02:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-10-19 00:24:00 +02:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2023-09-19 05:23:34 +02:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-10-19 00:24:00 +02:00
|
|
|
|
|
|
|
- name: Login to DockerHub
|
2024-03-31 00:47:13 +01:00
|
|
|
if: github.event_name != 'pull_request'
|
2023-09-19 00:15:09 +02:00
|
|
|
uses: docker/login-action@v3
|
2020-10-19 00:24:00 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2020-10-29 05:18:07 +01:00
|
|
|
- name: Login to GitHub Container Registry
|
2024-03-31 00:47:13 +01:00
|
|
|
if: github.event_name != 'pull_request'
|
2023-09-19 00:15:09 +02:00
|
|
|
uses: docker/login-action@v3
|
2020-10-29 05:18:07 +01:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
2023-03-28 06:21:07 +02:00
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2020-10-29 05:18:07 +01:00
|
|
|
|
2023-03-20 05:16:46 +01:00
|
|
|
- name: Login to Quay Container Registry
|
2024-03-31 00:47:13 +01:00
|
|
|
if: github.event_name != 'pull_request'
|
2023-09-19 00:15:09 +02:00
|
|
|
uses: docker/login-action@v3
|
2023-03-20 05:16:46 +01:00
|
|
|
with:
|
|
|
|
registry: quay.io
|
|
|
|
username: ${{ secrets.QUAY_USERNAME }}
|
|
|
|
password: ${{ secrets.QUAY_TOKEN }}
|
|
|
|
|
2022-03-16 06:39:16 +01:00
|
|
|
- name: Build and Push Alpine images
|
2023-09-19 00:15:18 +02:00
|
|
|
uses: docker/build-push-action@v5
|
2020-10-19 00:24:00 +02:00
|
|
|
with:
|
|
|
|
context: .
|
2022-03-16 06:39:16 +01:00
|
|
|
file: ./packaging/docker/alpine/Dockerfile
|
2020-10-19 00:24:00 +02:00
|
|
|
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
2024-03-31 00:47:13 +01:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.docker_alpine_tags.outputs.tags }}
|
2022-03-16 06:39:16 +01:00
|
|
|
|
|
|
|
- name: Build and Push Distroless images
|
2023-09-19 00:15:18 +02:00
|
|
|
uses: docker/build-push-action@v5
|
2022-03-16 06:39:16 +01:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./packaging/docker/distroless/Dockerfile
|
|
|
|
platforms: linux/amd64,linux/arm64
|
2024-03-31 00:47:13 +01:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.docker_distroless_tags.outputs.tags }}
|