Skip to content

Server refactor

Server refactor #11

Workflow file for this run

name: Docker
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
docker:
name: Docker
runs-on: ubuntu-24.04
env:
USER: albireox
APP: evora-server
steps:
- uses: actions/checkout@v6
- name: Download SDK zip file
run: |
curl -L -o andor.zip ${{ secrets.ANDOR_SDK_LINK }}
- name: Extract SDK
run: |
rm -Rf andor
unzip andor.zip -d andor_tmp
mv andor_tmp/andor ./
rm -Rf andor.zip andor_tmp
- name: List files
run: |
ls
- name: List Andor SDK files
run: |
ls andor
- name: Set docker tags
id: set-tags
run: |
if [[ $GITHUB_REF == refs/heads/main ]]
then
echo TAGS=$USER/$APP:latest >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/heads/* ]]
then
BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's/[\/]/_/g')
echo TAGS=$USER/$APP:$BRANCH >> $GITHUB_OUTPUT
elif [[ $GITHUB_REF == refs/pull/* ]]
then
BRANCH=${{ github.head_ref || github.ref_name }}
echo TAGS=$USER/$APP:$BRANCH >> $GITHUB_OUTPUT
else
echo TAGS=$USER/$APP:${GITHUB_REF#refs/tags/} >> $GITHUB_OUTPUT
fi
- name: Show tags
run: echo ${{ steps.set-tags.outputs.TAGS }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
push: true
provenance: false
tags: ghcr.io/${{ steps.set-tags.outputs.TAGS }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}