Skip to content

Commit

Permalink
Merge pull request #27 from docksal/develop
Browse files Browse the repository at this point in the history
Release 1.6.0
  • Loading branch information
lmakarov authored Nov 8, 2021
2 parents 71cfbd7 + d0535f7 commit a466e00
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 87 deletions.
115 changes: 115 additions & 0 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Build, Test, Push

on:
schedule:
- cron: '0 10 * * 0' # Every Sunday at 10AM
push:
branches:
- master
- develop
- feature/*
tags:
- 'v*.*.*'
workflow_dispatch: # Allow manually triggering a build

defaults:
run:
shell: bash

env:
DOCKSAL_VERSION: develop
# Setting these while testing locally may result in data loss, so only use in CI.
DOCKSAL_DNS_DISABLED: 1
DOCKSAL_DNS_DOMAIN: docksal.site
EVENT_NAME: '${{ github.event_name }}'
REPO: docksal/mysql
LATEST_VERSION: 8.0

jobs:
default:
name: 'Build, test, and push'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
-
version: '5.7'
from: 'mysql:5.7'
-
version: '8.0'
from: 'mysql:8.0'

env:
VERSION: ${{ matrix.version }}
FROM: ${{ matrix.from }}

steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Check Docker
run: |
docker version
docker info
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Install BATS (tests)
run: |
git clone https://github.com/bats-core/bats-core.git
cd bats-core
sudo ./install.sh /usr/local
bats -v
-
name: Install Docksal
run: curl -sSL http://get.docksal.io | bash
-
name: fin version
run: fin version
-
name: fin sysinfo
run: fin sysinfo
-
name: Build and test
run: |
make
make test
-
name: Source name
id: source_name
run: |
echo "::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}"
echo "::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}"
if [[ ${{ github.event.ref }} =~ ^refs/tags/ ]]; then
echo "::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}"
else
echo "::set-output name=SOURCE_TAG::"
fi
-
name: Release on success
if: |
success() &&
(
github.ref == 'refs/heads/develop' ||
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/tags')
)
run: make release
env:
SOURCE_NAME: '${{ steps.source_name.outputs.SOURCE_NAME }}'
SOURCE_BRANCH: '${{ steps.source_name.outputs.SOURCE_BRANCH }}'
SOURCE_TAG: '${{ steps.source_name.outputs.SOURCE_TAG }}'
-
name: Log on failure
if: ${{ failure() }}
run: make logs
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

27 changes: 0 additions & 27 deletions 5.6/default.cnf

This file was deleted.

20 changes: 0 additions & 20 deletions 5.6/mysql-variables.txt

This file was deleted.

1 change: 0 additions & 1 deletion 5.7/mysql-variables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ character_set_database utf8mb4
character_set_filesystem binary
character_set_results utf8mb4
character_set_server utf8mb4
character_set_system utf8
collation_connection utf8mb4_general_ci
collation_database utf8mb4_unicode_ci
collation_server utf8mb4_unicode_ci
Expand Down
1 change: 0 additions & 1 deletion 8.0/mysql-variables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ character_set_database utf8mb4
character_set_filesystem binary
character_set_results utf8mb4
character_set_server utf8mb4
character_set_system utf8
collation_connection utf8mb4_0900_ai_ci
collation_database utf8mb4_0900_ai_ci
collation_server utf8mb4_0900_ai_ci
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-include env_make

FROM ?= mysql:5.6
VERSION ?= 5.6
FROM ?= mysql:5.7
VERSION ?= 5.7
BUILD_TAG ?= $(VERSION)
SOFTWARE_VERSION ?= $(VERSION)

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ This image(s) is part of the [Docksal](http://docksal.io) image library.

## Versions

- `docksal/mysql:5.6`, `docksal/mysql:latest`
- `docksal/mysql:5.7`
- `docksal/mysql:8.0`
- `docksal/mysql:8.0`, `docksal/mysql:latest`
10 changes: 5 additions & 5 deletions scripts/docker-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

is_edge ()
{
[[ "${TRAVIS_BRANCH}" == "develop" ]]
[[ "${SOURCE_BRANCH}" == "develop" ]]
}

is_stable ()
{
[[ "${TRAVIS_BRANCH}" == "master" ]]
[[ "${SOURCE_BRANCH}" == "master" ]]
}

is_release ()
{
[[ "${TRAVIS_TAG}" != "" ]]
[[ "${SOURCE_TAG}" != "" ]]
}

# Check whether the current build is for a pull request
is_pr ()
{
[[ "${TRAVIS_PULL_REQUEST}" != "false" ]]
[[ "${EVENT_NAME}" == "pull_request" ]]
}

is_latest ()
Expand All @@ -45,7 +45,7 @@ tag_and_push ()
# ---------------------------- #

# Extract version parts from release tag
IFS='.' read -a ver_arr <<< "$TRAVIS_TAG"
IFS='.' read -a ver_arr <<< "$SOURCE_TAG"
VERSION_MAJOR=${ver_arr[0]#v*} # 2.7.0 => "2"
VERSION_MINOR=${ver_arr[1]} # "2.7.0" => "7"

Expand Down

0 comments on commit a466e00

Please sign in to comment.