Skip to content

Commit

Permalink
Added release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mariadb-mmontes committed Apr 22, 2024
1 parent c4e69d8 commit 4835c7f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
required: true

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx

- name: Login DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish multi-arch Docker image
uses: docker/build-push-action@v5
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
# TODO: linux/arm64
platforms: linux/amd64
# TODO: point to mariadb/maxscale
tags: |
mariadbmmontes/enterprise-server:${{ github.event.inputs.version }}-ubi
labels: |
org.opencontainers.image.title=MariaDB MaxScale
org.opencontainers.image.description=MariaDB MaxScale is a database proxy that extends the high availability, scalability, and security of MariaDB Server
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ github.event.inputs.version }}
- name: Preflight image
run: make preflight-image-submit
env:
# TODO: point to mariadb/maxscale
IMAGE_NAME: mariadbmmontes/enterprise-server
MXS_VERSION: ${{ github.event.inputs.version }}
REDHAT_API_KEY: "${{ secrets.REDHAT_API_KEY }}"
REDHAT_PROJECT_ID: "${{ secrets.REDHAT_PROJECT_ID }}"
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
IMAGE_NAME := mariadb/maxscale
# TODO: pin IMAGE_NAME
IMAGE_NAME ?= mariadb/maxscale
MXS_VERSION ?=
IMAGE_TAG := $(IMAGE_NAME):$(MXS_VERSION)-ubi
USAGE := "Usage: make build-image MXS_VERSION=<mxs-version>"
REDHAT_PROJECT_ID ?= ""
REDHAT_API_KEY ?= ""
REDHAT_PROJECT_ID ?=
REDHAT_API_KEY ?=
DOCKER_CONFIG ?= $(HOME)/.docker/config.json

## Location to install dependencies to
Expand Down

0 comments on commit 4835c7f

Please sign in to comment.