-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nina Bernick
committed
Jun 3, 2024
1 parent
7c75422
commit b97d14d
Showing
2 changed files
with
57 additions
and
33 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,57 @@ | ||
name: Platformics CI | ||
|
||
on: | ||
push | ||
|
||
jobs: | ||
cancel-previous: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
build-and-test: | ||
name: build and test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
- name: set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.11' | ||
- name: install poetry | ||
run: | | ||
python -m pip install --no-cache-dir poetry==1.8 supervisor | ||
- name: set up docker | ||
run: | | ||
make gha-setup | ||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: build docker image and push to gchr.io | ||
run: | | ||
TAG=$(git describe --long --tags --always --dirty) | ||
IMAGE_NAME=platformics | ||
IMAGE_URI="ghcr.io/${GITHUB_REPOSITORY}/${IMAGE_NAME}" | ||
rm -rf dist/*.whl | ||
docker compose build | ||
docker push "${IMAGE_URI}:${TAG}" | ||
if [[ ${GITHUB_REF##*/} == "main" ]]; then | ||
docker tag "${IMAGE_URI}:${TAG}" "${IMAGE_URI}:latest" | ||
docker push "${IMAGE_URI}:latest" | ||
fi | ||
- name: run tests | ||
run: | | ||
make test |
This file was deleted.
Oops, something went wrong.