Skip to content

add samples_last_modified to instance; use it in worker; #20

add samples_last_modified to instance; use it in worker;

add samples_last_modified to instance; use it in worker; #20

Workflow file for this run

name: tagged release
on:
push:
tags:
- "v*.*.*"
env:
IMAGE_NAME_TF: "koi-core-tf"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "checkout code"
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: "install dependencies"
run: pip install build
- name: "build wheel and source distribution"
run: python -m build
- name: "build docker image"
run: docker build . --file cpu-tf.Dockerfile --tag $IMAGE_NAME_TF --label "runnumber=${GITHUB_RUN_ID}"
- name: publish the package as Release v*.*.*
uses: softprops/action-gh-release@v1
with:
name: "Release ${{ github.ref_name }}"
body_path: CHANGELOG.md
generate_release_notes: false
files: |
dist/koi_core-*.whl
dist/koi-core-*.tar.gz
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: "publish docker image"
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME_TF
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME_TF $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION