|
6 | 6 |
|
7 | 7 | jobs: |
8 | 8 | sdk-publish: |
9 | | - # This job publishes the SDK package to PyPI |
| 9 | + # This job publishes the package to PyPI |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | defaults: |
12 | 12 | run: |
|
58 | 58 | uses: pypa/gh-action-pypi-publish@release/v1 |
59 | 59 | with: |
60 | 60 | password: ${{ secrets.PYPI_ORG_TOKEN }} |
| 61 | + |
| 62 | + server-publish: |
| 63 | + # This job publishes the server docker image to DockerHub |
| 64 | + runs-on: ubuntu-latest |
| 65 | + defaults: |
| 66 | + run: |
| 67 | + working-directory: ./server |
| 68 | + steps: |
| 69 | + - name: Checkout Repository |
| 70 | + uses: actions/checkout@v4 |
| 71 | + |
| 72 | + - name: Extract Docker image metadata |
| 73 | + id: meta |
| 74 | + uses: docker/metadata-action@v5 |
| 75 | + with: |
| 76 | + images: eclipsebasyx/basyx-python-server |
| 77 | + # This fetches the latest git tag and adds an additional "latest" to it, so e.g. `2.1.0,latest` |
| 78 | + tags: | |
| 79 | + type=semver,pattern={{version}} |
| 80 | + type=raw,value=latest |
| 81 | + labels: | |
| 82 | + org.opencontainers.image.title=BaSyx Python Server |
| 83 | + org.opencontainers.image.description=Eclipse BaSyx Python SDK - HTTP Server |
| 84 | + org.opencontainers.image.source=https://github.com/eclipse-basyx/basyx-python-sdk/tree/main/server |
| 85 | + org.opencontainers.image.licenses=MIT |
| 86 | +
|
| 87 | + - name: Log in to Docker Hub |
| 88 | + uses: docker/login-action@v4 |
| 89 | + with: |
| 90 | + username: ${{ secrets.DOCKER_HUB_USER }} |
| 91 | + password: ${{ secrets.DOCKER_HUB_TOKEN }} |
| 92 | + |
| 93 | + - name: Build and Push Docker Image |
| 94 | + uses: docker/build-push-action@v6 |
| 95 | + with: |
| 96 | + context: . |
| 97 | + file: ./server/Dockerfile # Todo: Update paths |
| 98 | + push: true |
| 99 | + tags: ${{ steps.meta.outputs.tags }} |
| 100 | + labels: ${{ steps.meta.outputs.labels }} |
0 commit comments