2022-05-21 22:09:02 +02:00
|
|
|
name: Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "master"
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish_api:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2022-05-22 00:33:48 +02:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
2023-06-28 15:50:57 +02:00
|
|
|
images: ghcr.io/sussycatgirl/automod-api
|
2022-05-22 00:33:48 +02:00
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 22:09:02 +02:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
-
|
|
|
|
name: Build and push - API
|
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
2022-07-12 18:09:42 +02:00
|
|
|
context: .
|
2022-07-12 18:12:19 +02:00
|
|
|
file: ./api/Dockerfile
|
2022-05-22 00:02:59 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-22 00:33:48 +02:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2022-05-21 22:09:02 +02:00
|
|
|
|
|
|
|
publish_web:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2022-05-22 00:33:48 +02:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
2023-06-28 15:50:57 +02:00
|
|
|
images: ghcr.io/sussycatgirl/automod-web
|
2022-05-22 00:33:48 +02:00
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 22:09:02 +02:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
-
|
|
|
|
name: Build and push - Web
|
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
2022-07-12 18:09:42 +02:00
|
|
|
context: .
|
2022-07-12 18:12:19 +02:00
|
|
|
file: ./web/Dockerfile
|
2022-05-22 00:02:59 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-22 00:33:48 +02:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2022-05-21 22:09:02 +02:00
|
|
|
|
|
|
|
publish_bridge:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2023-04-12 22:06:44 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-05-22 00:33:48 +02:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
2023-06-28 15:50:57 +02:00
|
|
|
images: ghcr.io/sussycatgirl/automod-bridge
|
2022-05-22 00:33:48 +02:00
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 22:09:02 +02:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
-
|
|
|
|
name: Build and push - Bridge
|
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
2022-07-12 18:09:42 +02:00
|
|
|
context: .
|
2022-07-12 18:12:19 +02:00
|
|
|
file: ./bridge/Dockerfile
|
2022-05-22 00:02:59 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-22 00:33:48 +02:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2022-05-21 22:09:02 +02:00
|
|
|
|
|
|
|
publish_bot:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2023-04-12 22:09:18 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-05-22 00:33:48 +02:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
2023-06-28 15:50:57 +02:00
|
|
|
images: ghcr.io/sussycatgirl/automod-bot
|
2022-05-22 00:33:48 +02:00
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 22:09:02 +02:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
-
|
|
|
|
name: Build and push - Bot
|
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
2022-07-12 18:09:42 +02:00
|
|
|
context: .
|
2022-07-12 18:12:19 +02:00
|
|
|
file: ./bot/Dockerfile
|
2022-05-22 00:02:59 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-22 00:33:48 +02:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|