Skip to content

update to use logging endpoint #14

update to use logging endpoint

update to use logging endpoint #14

Workflow file for this run

name: icrs access server router docker image build
on:
push:
branches:
- main
paths:
- 'server/**'
- '.github/workflows/server.yml'
jobs:
version:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml
- name: Get version from pyproject.toml file
id: get_version
working-directory: ./server
run: |
version=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
echo "VERSION=${version}" >> $GITHUB_OUTPUT
- name: Set VERSION for next jobs
id: set_version
run: echo "VERSION=${{ steps.get_version.outputs.VERSION }}" >> $GITHUB_ENV
docker:
needs:
- version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
icroboticssociety/icrs-server-router
tags: |
type=raw,value=${{ needs.version.outputs.VERSION }}
type=raw,value=latest,enable={{is_default_branch}}
type=sha
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
context: ./server
tags: ${{ steps.meta.outputs.tags }}
file: ./server/Dockerfile