2022-05-21 20:09:02 +00: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-21 22:33:48 +00:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
|
|
|
images: ghcr.io/janderedev/automod-api
|
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 20:09:02 +00: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 16:09:42 +00:00
|
|
|
context: .
|
2022-07-12 16:12:19 +00:00
|
|
|
file: ./api/Dockerfile
|
2022-05-21 22:02:59 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-21 22:33:48 +00:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2022-05-21 20:09:02 +00:00
|
|
|
|
|
|
|
publish_web:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2022-05-21 22:33:48 +00:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
|
|
|
images: ghcr.io/janderedev/automod-web
|
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 20:09:02 +00: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 16:09:42 +00:00
|
|
|
context: .
|
2022-07-12 16:12:19 +00:00
|
|
|
file: ./web/Dockerfile
|
2022-05-21 22:02:59 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-21 22:33:48 +00:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2022-05-21 20:09:02 +00:00
|
|
|
|
|
|
|
publish_bridge:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2023-04-12 20:06:44 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-05-21 22:33:48 +00:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
|
|
|
images: ghcr.io/janderedev/automod-bridge
|
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 20:09:02 +00: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 16:09:42 +00:00
|
|
|
context: .
|
2022-07-12 16:12:19 +00:00
|
|
|
file: ./bridge/Dockerfile
|
2022-05-21 22:02:59 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-21 22:33:48 +00:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2022-05-21 20:09:02 +00:00
|
|
|
|
|
|
|
publish_bot:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2023-04-12 20:09:18 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-05-21 22:33:48 +00:00
|
|
|
-
|
|
|
|
name: Docker meta
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
# list of Docker images to use as base name for tags
|
|
|
|
images: ghcr.io/janderedev/automod-bot
|
|
|
|
# generate Docker tags based on branch and short commit SHA
|
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=sha
|
2022-05-21 20:09:02 +00: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 16:09:42 +00:00
|
|
|
context: .
|
2022-07-12 16:12:19 +00:00
|
|
|
file: ./bot/Dockerfile
|
2022-05-21 22:02:59 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-21 22:33:48 +00:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|