-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
phoenixAja
committed
Apr 8, 2024
1 parent
2e1c117
commit 2329bc3
Showing
2 changed files
with
43 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Index Generation NCBI Compress cargo tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'workflows/index-generation/ncbi-compress/*' | ||
|
||
env: | ||
LC_ALL: C.UTF-8 | ||
LANG: C.UTF-8 | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
jobs: | ||
cargo-test: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: docker login ghcr.io | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: docker build + push to ghcr.io | ||
run: | | ||
TAG=$(git describe --long --tags --always --dirty) | ||
IMAGE_NAME=czid-index-generation-public | ||
IMAGE_URI="ghcr.io/${GITHUB_REPOSITORY}/${IMAGE_NAME}" | ||
CACHE_FROM=""; docker pull "$IMAGE_URI" && CACHE_FROM="--cache-from $IMAGE_URI" | ||
./scripts/docker-build.sh "workflows/index-generation" --tag "${IMAGE_URI}:${TAG}" $CACHE_FROM \ | ||
|| ./scripts/docker-build.sh "workflows/index-generation" --tag "${IMAGE_URI}:${TAG}" | ||
docker push "${IMAGE_URI}:${TAG}" | ||
if [[ ${GITHUB_REF##*/} == "main" ]]; then | ||
docker tag "${IMAGE_URI}:${TAG}" "${IMAGE_URI}:latest" | ||
docker push "${IMAGE_URI}:latest" | ||
fi | ||
echo "IMAGE_URI=${IMAGE_URI}" >> $GITHUB_ENV | ||
echo "TAG=${TAG}" >> $GITHUB_ENV | ||
- name: run cargo tests | ||
run: | | ||
make cargo-test-index-generation |
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