feat: add use case for migrating a single conversation to MLS (#4103) #364
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and publish image of Testservice to quay.io | |
| on: | |
| push: | |
| branches: ["develop"] | |
| tags: ["android-v*", "test-service-v*"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate-tag: | |
| if: github.repository == 'wireapp/kalium' && startsWith(github.ref, 'refs/tags/test-service-v') | |
| uses: ./.github/workflows/validate-release-tag.yml | |
| with: | |
| tag-name: ${{ github.ref_name }} | |
| secrets: inherit | |
| build-testservice-jar: | |
| if: startsWith(github.ref, 'refs/tags/test-service-v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build testservice fatjar | |
| run: ./gradlew :tools:testservice:shadowJar | |
| - name: Upload testservice fatjar | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: testservice-fatjar | |
| path: tools/testservice/build/libs/testservice-*-all.jar | |
| if-no-files-found: error | |
| publish-docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to Quay | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: quay.io | |
| username: wire+testservice_kalium_bot | |
| password: ${{ secrets.QUAY_TESTSERVICE_PASSWORD }} | |
| - name: Resolve image tags | |
| id: image_tags | |
| run: | | |
| if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then | |
| echo "tags=quay.io/wire/testservice:${GITHUB_REF_NAME},quay.io/wire/testservice:${GITHUB_SHA}" >> "${GITHUB_OUTPUT}" | |
| else | |
| echo "tags=quay.io/wire/testservice:latest,quay.io/wire/testservice:${GITHUB_SHA}" >> "${GITHUB_OUTPUT}" | |
| fi | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./tools/testservice/Dockerfile | |
| platforms: linux/amd64 | |
| tags: ${{ steps.image_tags.outputs.tags }} | |
| push: true | |
| publish-github-release: | |
| if: startsWith(github.ref, 'refs/tags/test-service-v') | |
| needs: [validate-tag, build-testservice-jar, publish-docker] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download testservice fatjar | |
| uses: actions/download-artifact@v8.0.1 | |
| with: | |
| name: testservice-fatjar | |
| path: release-artifacts | |
| - name: Resolve release body | |
| run: | | |
| cat <<EOF > release-notes.md | |
| Testservice release for tag ${{ github.ref_name }}. | |
| Docker images: | |
| - quay.io/wire/testservice:${{ github.ref_name }} | |
| - quay.io/wire/testservice:${{ github.sha }} | |
| Attached asset is the fatjar built for this tag. | |
| EOF | |
| - name: Publish GitHub release and upload fatjar | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| make_latest: false | |
| body_path: release-notes.md | |
| files: release-artifacts/* | |
| fail_on_unmatched_files: true |