Skip to content

Add get_version endpoint to identify REST API current version #160

Add get_version endpoint to identify REST API current version

Add get_version endpoint to identify REST API current version #160

Workflow file for this run

name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install tox
run: pip install tox
- name: Cache tox environments
id: cache-tox
uses: actions/cache@v3
with:
path: .tox
# requirements/*.txt, pyproject.toml, and .pre-commit-config.yaml
# have versioning info that would impact the tox environment.
key: tox-${{ hashFiles('requirements/*.txt') }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run tox
run: tox -e lint,py,coverage-report,typing # run tox using Python in path
build:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v3
- name: Define the Docker tag
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF} | sed -E 's,refs/(heads|tags)/,,' | sed -E 's,/,-,g')
- name: Print the tag
id: print
run: echo ${{steps.vars.outputs.tag}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/lsst-ts/narrativelog:${{ steps.vars.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64