Skip to content

Update self-hosted CD #59

Update self-hosted CD

Update self-hosted CD #59

Workflow file for this run

name: container
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: [snail-runners]
steps:
- name: Login to local container registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.LOCAL_REG_URL }}
username: ${{ secrets.LOCAL_REG_USER }}
password: ${{ secrets.LOCAL_REG_PASS }}
- name: Install git
run: sudo apt-get update && sudo apt-get install -y git
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build the container
run: docker build . --file ./docker/Dockerfile --tag ${{ secrets.LOCAL_REG_URL }}/secret-snail/localization-server:latest
- name: Run the tests in the container
run: |
docker run --rm ${{ secrets.LOCAL_REG_URL }}/secret-snail/localization-server:latest \
bash -c "cd ./build && ctest"
- name: Push the container
run: docker push ${{ secrets.LOCAL_REG_URL }}/secret-snail/localization-server:latest