Files
bsky-feedgen/.github/workflows/publish-docker.yaml
2025-10-25 15:54:35 +04:00

100 lines
2.5 KiB
YAML

name: Publish Docker Images
on:
push:
branches:
- main
paths:
- 'cmd/*/version.go'
- 'cmd/feedgen/*/version.go'
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
api: ${{ steps.filter.outputs.api }}
consumer: ${{ steps.filter.outputs.consumer }}
feedgen-az: ${{ steps.filter.outputs.feedgen-az }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
api:
- 'cmd/api/version.go'
consumer:
- 'cmd/consumer/version.go'
feedgen-az:
- 'cmd/feedgen/az/version.go'
publish-api:
needs: detect-changes
if: needs.detect-changes.outputs.api == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.aykhans.me
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Task
uses: arduino/setup-task@v2
- name: Build and publish API
run: task docker-publish-api
publish-consumer:
needs: detect-changes
if: needs.detect-changes.outputs.consumer == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.aykhans.me
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Task
uses: arduino/setup-task@v2
- name: Build and publish Consumer
run: task docker-publish-consumer
publish-feedgen-az:
needs: detect-changes
if: needs.detect-changes.outputs.feedgen-az == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.aykhans.me
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Task
uses: arduino/setup-task@v2
- name: Build and publish Feedgen AZ
run: task docker-publish-feedgen-az