|
6 | 6 | - icij-worker-* |
7 | 7 |
|
8 | 8 | jobs: |
| 9 | + create-release: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + - name: Create GH release |
| 14 | + run: gh release create "$tag" --generate-notes |
| 15 | + env: |
| 16 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 17 | + tag: ${{ github.ref_name }} |
| 18 | + |
9 | 19 | publish-icij-worker: |
| 20 | + needs: [create-release] |
10 | 21 | runs-on: ubuntu-latest |
11 | 22 | environment: |
12 | 23 | name: pypi-icij-worker |
|
26 | 37 | uv build |
27 | 38 | uv publish --trusted-publishing always |
28 | 39 |
|
| 40 | + publish-http-service-docker: |
| 41 | + needs: [ create-release ] |
| 42 | + runs-on: ubuntu-latest |
| 43 | + steps: |
| 44 | + - name: Determine DBMate architecture |
| 45 | + id: arch |
| 46 | + run: | |
| 47 | + DBMATE_ARCH=$(arch || uname -m) |
| 48 | + if [[ "$DBMATE_ARCH" == "x86_64" || "$DBMATE_ARCH" == "amd64" ]]; then |
| 49 | + DBMATE_ARCH="amd64" |
| 50 | + elif [[ "$DBMATE_ARCH" == "aarch64" || "$DBMATE_ARCH" == "arm64" ]]; then |
| 51 | + DBMATE_ARCH="arm64" |
| 52 | + elif [[ "$DBMATE_ARCH" == "i386" ]]; then |
| 53 | + DBMATE_ARCH="386" |
| 54 | + else |
| 55 | + echo "Unsupported architecture: $DBMATE_ARCH" >&2 |
| 56 | + exit 1 |
| 57 | + fi |
| 58 | + echo "DBMATE_ARCH=$DBMATE_ARCH" >> $GITHUB_ENV |
| 59 | +
|
| 60 | + - name: Docker meta |
| 61 | + id: meta |
| 62 | + uses: docker/metadata-action@v5 |
| 63 | + with: |
| 64 | + images: icij/task-service |
| 65 | + |
| 66 | + - name: Set up QEMU |
| 67 | + uses: docker/setup-qemu-action@v3 |
| 68 | + |
| 69 | + - name: Set up Docker Buildx |
| 70 | + uses: docker/setup-buildx-action@v3 |
| 71 | + |
| 72 | + - name: Login to Docker Hub |
| 73 | + uses: docker/login-action@v3 |
| 74 | + with: |
| 75 | + username: ${{ secrets.DOCKERHUB_USERNAME }} |
| 76 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 77 | + |
| 78 | + - name: Build and push the service image |
| 79 | + uses: docker/build-push-action@v6 |
| 80 | + with: |
| 81 | + context: icij-worker |
| 82 | + target: http-service |
| 83 | + platforms: linux/amd64,linux/arm64 |
| 84 | + push: true |
| 85 | + tags: ${{ steps.meta.outputs.tags }} |
| 86 | + labels: ${{ steps.meta.outputs.labels }} |
| 87 | + |
29 | 88 | concurrency: |
30 | 89 | group: ${{ github.workflow }}-${{ github.ref }} |
31 | 90 | cancel-in-progress: false |
0 commit comments