Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add a test to check if groonga command is executable #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@ jobs:
version=latest
;;
esac
tags="groonga/groonga:${version}-${{ matrix.id }}"
tag="groonga/groonga:${version}-${{ matrix.id }}"
tags="${tag}"
if [ ${{ matrix.id }} = "debian" -a "${version}" = "latest" ]; then
tags="${tags},groonga/groonga:latest"
fi

need_push="no"
if [ "${GITHUB_EVENT_NAME}" = "push" ]; then
if [ "${GITHUB_EVENT_NAME}" = "push" ] && [ "${GITHUB_REPOSITORY}" = "groonga/docker" ]; then
need_push="yes"
fi
echo "DISTRIBUTION=${distribution}" >> ${GITHUB_ENV}
echo "CONTEXT=./${distribution}" >> ${GITHUB_ENV}
echo "TAG=${tag}" >> ${GITHUB_ENV}
echo "TAGS=${tags}" >> ${GITHUB_ENV}
echo "NEED_PUSH=${need_push}" >> ${GITHUB_ENV}
- uses: actions/checkout@v4
Expand All @@ -56,9 +58,13 @@ jobs:
# cache-to: type=gha,mode=max
context: ${{ env.CONTEXT }}
push: ${{ env.NEED_PUSH == 'yes' }}
load: ${{ env.NEED_PUSH != 'yes' }}
tags: ${{ env.TAGS }}
- name: Image info
run: |
echo "ref: ${{ github.ref }}"
echo "tags: ${{ env.TAGS }}"
echo "digest: ${{ steps.docker_build.outputs.digest }}"
- name: Test if groonga command is executable
run: |
docker container run --rm --entrypoint "groonga" "${TAG}" --version
Loading