Skip to content

Commit 073bf60

Browse files
committed
chore: ci pipelines
1 parent 6c93fab commit 073bf60

File tree

3 files changed

+122
-1
lines changed

3 files changed

+122
-1
lines changed

.github/workflows/devel.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: devel
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
docker:
10+
name: Docker test
11+
strategy:
12+
matrix:
13+
arch:
14+
- linux/amd64
15+
# - linux/arm64
16+
# - linux/arm/v7
17+
# - linux/arm/v6
18+
runs-on: ubuntu-20.04
19+
steps:
20+
-
21+
name: Checkout
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 1
25+
-
26+
name: Cache Docker layers
27+
uses: actions/cache@v2
28+
with:
29+
path: /tmp/.buildx-cache
30+
key: alpine-mysql-client-${{ matrix.arch }}-buildx-${{ github.sha }}
31+
restore-keys: |
32+
alpine-mysql-client-${{ matrix.arch }}-buildx-
33+
-
34+
name: Set up QEMU
35+
uses: docker/setup-qemu-action@v1
36+
-
37+
name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v1
39+
-
40+
name: Build and Test
41+
uses: docker/build-push-action@v2
42+
with:
43+
push: false
44+
context: .
45+
platforms: ${{ matrix.arch }}
46+
file: Dockerfile
47+
tags: joseluisq/alpine-mysql-client:latest
48+
cache-from: type=local,src=/tmp/.buildx-cache
49+
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
50+
-
51+
# Temp fix
52+
# https://github.com/docker/build-push-action/issues/252
53+
# https://github.com/moby/buildkit/issues/1896
54+
name: Move cache
55+
run: |
56+
rm -rf /tmp/.buildx-cache
57+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- 'v1.[0-9]+.[0-9]+'
6+
- 'v1.[0-9]+.[0-9]+-beta.[0-9]+'
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v2
15+
-
16+
name: Set up QEMU
17+
uses: docker/setup-qemu-action@v1
18+
-
19+
name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v3
22+
with:
23+
images: joseluisq/alpine-mysql-client
24+
tags: |
25+
type=semver,pattern={{version}}
26+
type=semver,pattern={{major}}.{{minor}}
27+
type=semver,pattern={{major}}
28+
-
29+
name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v1
31+
-
32+
name: Login to DockerHub
33+
uses: docker/login-action@v1
34+
with:
35+
username: ${{ secrets.DOCKERHUB_USERNAME }}
36+
password: ${{ secrets.DOCKERHUB_TOKEN }}
37+
-
38+
name: Prepare Docker envs
39+
shell: bash
40+
run: |
41+
echo "VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV
42+
-
43+
name: Build and push
44+
uses: docker/build-push-action@v2
45+
with:
46+
push: true
47+
context: .
48+
platforms: linux/amd64
49+
# platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6
50+
file: Dockerfile
51+
tags: ${{ steps.meta.outputs.tags }}
52+
build-args: |
53+
VERSION=${{ env.VERSION }}

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# Alpine MySQL Client ![Docker Image Size](https://img.shields.io/docker/image-size/joseluisq/alpine-mysql-client/1) ![Docker Image Version](https://img.shields.io/docker/v/joseluisq/alpine-mysql-client/1) ![Docker Pulls](https://img.shields.io/docker/pulls/joseluisq/alpine-mysql-client.svg)
1+
# Alpine MySQL Client
2+
3+
[![devel](https://github.com/joseluisq/alpine-mysql-client/actions/workflows/devel.yml/badge.svg)](https://github.com/joseluisq/alpine-mysql-client/actions/workflows/devel.yml) ![Docker Image Size](https://img.shields.io/docker/image-size/joseluisq/alpine-mysql-client/1) ![Docker Image Version](https://img.shields.io/docker/v/joseluisq/alpine-mysql-client/1) ![Docker Pulls](https://img.shields.io/docker/pulls/joseluisq/alpine-mysql-client.svg)
24

35
> [MySQL client](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html) for easy **export** and **import** databases using Docker.
46
7+
If uou are looking for MySQL 8 Client then go to [Docker MySQL 8 Client](https://github.com/joseluisq/alpine-mysql-client)
8+
59
🐳 View on [Docker Hub](https://hub.docker.com/r/joseluisq/alpine-mysql-client/)
610

711
## MySQL Client programs
@@ -28,6 +32,13 @@ For more details check it out:
2832
- [MariaDB 10 - Clients and Utilities](https://mariadb.com/kb/en/clients-utilities/)
2933
- [MySQL 8 - Client Programs](https://dev.mysql.com/doc/refman/8.0/en/programs-client.html)
3034

35+
## Usage
36+
37+
```sh
38+
docker run -it --rm joseluisq/alpine-mysql-client mysql --version
39+
# mysql Ver 15.1 Distrib 10.6.4-MariaDB, for Linux (x86_64) using readline 5.1
40+
```
41+
3142
## User privileges
3243

3344
- Default user (unprivileged) is `mysql`.

0 commit comments

Comments
 (0)