Skip to content

Merge pull request #1288 from Bastian-Krause/bst/revert-sshdriver-wai… #395

Merge pull request #1288 from Bastian-Krause/bst/revert-sshdriver-wai…

Merge pull request #1288 from Bastian-Krause/bst/revert-sshdriver-wai… #395

Workflow file for this run

name: docker build
on:
push:
branches: [ master ]
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt install -yq python3-pip
python3 -m pip install setuptools_scm
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker image
run: |
./dockerfiles/build.sh
docker-compose -f dockerfiles/staging/docker-compose.yml up --exit-code-from client client
docker-compose -f dockerfiles/staging/docker-compose.yml down
docker images
- name: Tag latest images
run: |
docker tag labgrid-client ${{ secrets.DOCKERHUB_PREFIX }}client
docker tag labgrid-exporter ${{ secrets.DOCKERHUB_PREFIX }}exporter
docker tag labgrid-coordinator ${{ secrets.DOCKERHUB_PREFIX }}coordinator
- name: Tag release image
if: startsWith(github.ref, 'refs/tags')
run: |
docker tag labgrid-client ${{ secrets.DOCKERHUB_PREFIX }}client:${GITHUB_REF_NAME}
docker tag labgrid-exporter ${{ secrets.DOCKERHUB_PREFIX }}exporter:${GITHUB_REF_NAME}
docker tag labgrid-coordinator ${{ secrets.DOCKERHUB_PREFIX }}coordinator:${GITHUB_REF_NAME}
- name: Push to dockerhub
run: |
docker push --all-tags ${{ secrets.DOCKERHUB_PREFIX }}client
docker push --all-tags ${{ secrets.DOCKERHUB_PREFIX }}exporter
docker push --all-tags ${{ secrets.DOCKERHUB_PREFIX }}coordinator
- name: Show images again
run: docker images