Bump zim-tools to 3.4.2 #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- dnscache-v* | |
- uploader-v* | |
jobs: | |
paths-filter: | |
runs-on: ubuntu-22.04 | |
outputs: | |
dispatcher_backend: ${{ steps.filter.outputs.dispatcher_backend }} | |
dispatcher_frontend_ui: ${{ steps.filter.outputs.dispatcher_frontend_ui }} | |
dnscache: ${{ steps.filter.outputs.dnscache }} | |
monitor: ${{ steps.filter.outputs.monitor }} | |
receiver: ${{ steps.filter.outputs.receiver }} | |
uploader: ${{ steps.filter.outputs.uploader }} | |
watcher: ${{ steps.filter.outputs.watcher }} | |
task_worker: ${{ steps.filter.outputs.task_worker }} | |
worker_manager: ${{ steps.filter.outputs.worker_manager }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
dispatcher_backend: | |
- 'dispatcher/backend/**' | |
dispatcher_frontend_ui: | |
- 'dispatcher/frontend-ui/**' | |
dnscache: | |
- 'dnscache/**' | |
monitor: | |
- 'monitor/**' | |
receiver: | |
- 'receiver/**' | |
uploader: | |
- 'uploader/**' | |
watcher: | |
- 'watcher/**' | |
task_worker: | |
- 'workers/**' | |
worker_manager: | |
- 'workers/**' | |
dnscache: | |
name: Dnscache build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.dnscache == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/dnscache | |
on-master: latest | |
tag-pattern: /^dnscache-v([0-9.]+)$/ | |
restrict-to: openzim/zimfarm | |
context: dnscache | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
uploader: | |
name: Uploader build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.uploader == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/uploader | |
on-master: latest | |
tag-pattern: /^uploader-v([0-9.]+)$/ | |
restrict-to: openzim/zimfarm | |
context: uploader | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
dispatcher: | |
name: Dispatcher build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.dispatcher_backend == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/zimfarm-dispatcher | |
on-master: latest | |
restrict-to: openzim/zimfarm | |
context: dispatcher/backend | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
- name: Deploy Zimfarm API changes to openzim.org | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.ZIMFARM_KUBE_CONFIG }} | |
with: | |
args: rollout restart deployments api-deployment -n zimfarm | |
- name: Deploy Zimfarm API changes to youzim.it | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.ZIMIT_KUBE_CONFIG }} | |
with: | |
args: rollout restart deployments api-deployment -n zimit | |
ui: | |
name: UI build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.dispatcher_frontend_ui == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/zimfarm-ui | |
on-master: latest | |
restrict-to: openzim/zimfarm | |
context: dispatcher/frontend-ui | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
- name: Deploy Zimfarm UI changes to openzim.org | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.ZIMFARM_KUBE_CONFIG }} | |
with: | |
args: rollout restart deployments ui-deployment -n zimfarm | |
- name: Deploy Zimfarm UI changes to youzim.it | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.ZIMIT_KUBE_CONFIG }} | |
with: | |
args: rollout restart deployments farm-ui-deployment -n zimit | |
receiver: | |
name: Receiver build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.receiver == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/zimfarm-receiver | |
on-master: latest | |
restrict-to: openzim/zimfarm | |
context: receiver | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
- name: Deploy Zimfarm receiver changes | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.ZIM_KUBE_CONFIG }} | |
with: | |
args: rollout restart deployments receiver-deployment -n zim | |
task-worker: | |
name: Task worker build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.task_worker == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/zimfarm-task-worker | |
on-master: latest | |
restrict-to: openzim/zimfarm | |
context: workers | |
dockerfile: task-Dockerfile | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
worker-manager: | |
name: Worker manager build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.worker_manager == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/zimfarm-worker-manager | |
on-master: latest | |
restrict-to: openzim/zimfarm | |
context: workers | |
dockerfile: manager-Dockerfile | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
monitor: | |
name: Monitor build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.monitor == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/zimfarm-monitor | |
on-master: latest | |
restrict-to: openzim/zimfarm | |
context: monitor | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
watcher: | |
name: Watcher build | |
runs-on: ubuntu-22.04 | |
needs: paths-filter | |
if: needs.paths-filter.outputs.watcher == 'true' | |
steps: | |
- name: Retrieve source code | |
uses: actions/checkout@v4 | |
- name: Build and publish Docker Image | |
uses: openzim/docker-publish-action@v10 | |
with: | |
image-name: openzim/zimfarm-watcher | |
on-master: latest | |
restrict-to: openzim/zimfarm | |
context: watcher | |
registries: ghcr.io | |
credentials: | |
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} | |
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} | |
- name: Deploy Zimfarm Watcher changes | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.ZIMFARM_KUBE_CONFIG }} | |
with: | |
args: rollout restart deployments watcher-deployment -n zimfarm |