Skip to content

Commit

Permalink
Rework workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Jan 19, 2025
1 parent afdd194 commit 09b8b78
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish release

on:
release:
types:
- published

jobs:
publish:
name: Publish Docker Images
runs-on: ubuntu-latest

strategy:
matrix:
service: [backup, controller, inbox, outbox, rspamd]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Docker QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
docker.io/${{ github.repository }}-${{ matrix.service }}
ghcr.io/${{ github.repository }}-${{ matrix.service }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest
- name: Build and Publish Docker Image
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.service }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
File renamed without changes.

0 comments on commit 09b8b78

Please sign in to comment.