First commit sepalated from k2hdkc_dbaas #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# K2HDKC DBaaS based on Trove | |
# | |
# Copyright 2024 Yahoo Japan Corporation | |
# | |
# K2HDKC DBaaS is a Database as a Service compatible with Trove which | |
# is DBaaS for OpenStack. | |
# Using K2HR3 as backend and incorporating it into Trove to provide | |
# DBaaS functionality. K2HDKC, K2HR3, CHMPX and K2HASH are components | |
# provided as AntPickax. | |
# | |
# For the full copyright and license information, please view | |
# the license file that was distributed with this source code. | |
# | |
# AUTHOR: Takeshi Nakatani | |
# CREATE: Fri Dec 13 2024 | |
# REVISION: | |
# | |
#------------------------------------------------------------------------------------ | |
# Github Actions | |
#------------------------------------------------------------------------------------ | |
name: AntPickax CI | |
# | |
# Events | |
# | |
on: | |
push: | |
pull_request: | |
# | |
# CRON event is fire on every sunday(UTC). | |
# | |
schedule: | |
- cron: '0 15 * * 0' | |
# | |
# Jobs | |
# | |
jobs: | |
troveimage: | |
runs-on: ubuntu-latest | |
# | |
# build matrix for containers | |
# | |
strategy: | |
# | |
# do not stop jobs automatically if any of the jobs fail | |
# | |
fail-fast: false | |
# | |
# matrix for containers | |
# | |
matrix: | |
# | |
# Specify the docker image type | |
# | |
imagetype: | |
- ubuntu | |
- alpine | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# | |
# Login to avoid the Docker Hub rate limit | |
# | |
# Github Secret cannot be read in the case of Pull Request, so that process | |
# here will fail, so we need to skip it. Even if we skip this process, if we | |
# are using the official Runner of Github Actions, the IP address rate will | |
# not be limited and we will not get an error. | |
# However, this restriction release is based on the contract between Github | |
# and DockerHub, so if we skip this process, we may get an error. | |
# | |
- name: Login to DockerHub | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESSTOKEN }} | |
# | |
# Set environments from secrets | |
# | |
# [NOTE] Secrets | |
# Use Secrets parameters to trove_build_helper.sh for checking, testing, building | |
# and pushing. | |
# | |
# The available Secret variables are listed below: | |
# OSTYPE_VARS_FILE : specify custom variables file | |
# FORCE_PUBLISH : true means force to publish packages, false means never publish | |
# USE_PRIVATE_DH_ORG : true means use private organization on DockerHub for pushing image | |
# * DOCKER_HUB_USERNAME : Docker Hub username to read/push the docker images | |
# * DOCKER_HUB_ACCESSTOKEN : Docker Hub user's Access Token | |
# | |
# [REQUIRED] | |
# DOCKER_HUB_USERNAME and DOCKER_HUB_ACCESSTOKEN is required to read and push docker images! | |
# | |
- name: Set environments from secrets | |
run: | | |
echo "ENV_DOCKER_IMAGE_TYPE=${{ matrix.imagetype }}" >> "${GITHUB_ENV}" | |
echo "ENV_OSTYPE_VARS_FILE=${{ secrets.OSTYPE_VARS_FILE }}" >> "${GITHUB_ENV}" | |
echo "ENV_FORCE_PUBLISH=${{ secrets.FORCE_PUBLISH }}" >> "${GITHUB_ENV}" | |
echo "ENV_USE_PRIVATE_DH_ORG=${{ secrets.USE_PRIVATE_DH_ORG }}" >> "${GITHUB_ENV}" | |
# | |
# Run all process | |
# | |
- name: Run all process | |
run: | | |
/bin/sh -c "$GITHUB_WORKSPACE/.github/workflows/trove_build_helper.sh --imagetype ${{ matrix.imagetype }}" | |
# | |
# Local variables: | |
# tab-width: 4 | |
# c-basic-offset: 4 | |
# End: | |
# vim600: noexpandtab sw=4 ts=4 fdm=marker | |
# vim<600: noexpandtab sw=4 ts=4 | |
# |