Skip to content

Use mysql:8.0-oracle for base image #50

Use mysql:8.0-oracle for base image

Use mysql:8.0-oracle for base image #50

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags:
- "*"
pull_request:
concurrency:
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.id }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
id:
- "mysql-8.0"
- "mysql-5.7"
steps:
- name: Parse ID
id: parse
run: |
set -x
push=false
case "${{ github.ref }}" in
refs/tags/*)
version=$(echo "${{ github.ref }}" | sed -e "s,^refs/tags/,,g")
case "${version}" in
${{ matrix.id }}.*)
push=true
;;
*)
version=${{ matrix.id }}-latest
push=false
;;
esac
;;
*)
version=${{ matrix.id }}-latest
push=true
;;
esac
tag="groonga/mroonga:${version}"
tags="${tag}"
if [ "${version}" = "mysql-5.7-latest" ]; then
tags="${tags},groonga/mroonga:latest"
fi
echo "::set-output name=push::${push}"
echo "::set-output name=tags::${tags}"
echo "TAG=${tag}" >> ${GITHUB_ENV}
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- uses: docker/setup-buildx-action@v2
id: buildx
- uses: docker/build-push-action@v4
id: docker_build
with:
# cache-from: type=gha
# cache-to: type=gha,mode=max
context: ${{ matrix.id }}
push: ${{ steps.parse.outputs.push }}
tags: ${{ steps.parse.outputs.tags }}
- name: Image info
run: |
echo "ref: ${{ github.ref }}"
echo "tags: ${{ steps.parse.outputs.tags }}"
echo "digest: ${{ steps.docker_build.outputs.digest }}"
- uses: actions/checkout@v3
with:
path: mroonga
repository: mroonga/mroonga
- name: Test
run: |
docker run \
--name mroonga \
-d \
--volume ${PWD}:/host \
${{ env.TAG }}
cd mroonga
ls -al test
pwd
docker exec mroonga test/run-sql-test.sh