chore(deps): update opentelemetry_sdk requirement in /relay #6
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: Publish - Relay | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'relay@*' | ||
| jobs: | ||
| build: | ||
| name: Build Docker image | ||
| env: | ||
| REGISTRY: ghcr.io | ||
| REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/tacoq-relay | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| # Run on both AMD64 and ARM64 | ||
| strategy: | ||
| matrix: | ||
| config: | ||
| - {arch: 'arm64', platform: 'linux/arm64'} | ||
| - {arch: 'amd64', platform: 'linux/amd64'} | ||
| runs-on: ${{ matrix.config.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Docker image metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.REGISTRY_IMAGE }} | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push by digest | ||
| id: build | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| file: relay/Dockerfile | ||
| context: . | ||
| platforms: ${{ matrix.config.platform }} | ||
| outputs: type=image,push-by-digest=true,name-canonical=true,push=true | ||
| tags: ${{ env.REGISTRY_IMAGE }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| - name: Export digest | ||
| run: | | ||
| mkdir -p ${{ runner.temp }}/digests | ||
| digest="${{ steps.build.outputs.digest }}" | ||
| touch "${{ runner.temp }}/digests/${digest#sha256:}" | ||
| - name: Upload digest | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: digests-${{ matrix.config.arch }} | ||
| path: ${{ runner.temp }}/digests/* | ||
| if-no-files-found: error | ||
| retention-days: 1 | ||
| merge: | ||
| name: Merge Docker manifest and publish | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| REGISTRY: ghcr.io | ||
| REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/tacoq-relay | ||
| needs: | ||
| - build | ||
| - extract_version | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - name: Extract tag version | ||
| uses: ./.github/actions/extract_version | ||
| id: version | ||
| - name: Download digests | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: ${{ runner.temp }}/digests | ||
| pattern: digests-* | ||
| merge-multiple: true | ||
| - name: Login to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Configure Docker image metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.REGISTRY_IMAGE }} | ||
| tags: | | ||
| type=ref,event=branch | ||
| type=ref,event=pr | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| - name: Create manifest list and push | ||
| working-directory: ${{ runner.temp }}/digests | ||
| run: | | ||
| EXTRA_TAG="" | ||
| if [ "${{ steps.extract_version.outputs.is_prerelease }}" != "true" ]; then | ||
| EXTRA_TAG="--tag ${{ env.REGISTRY_IMAGE }}:latest" | ||
| fi | ||
| docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
| $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) --tag ${{ env.REGISTRY_IMAGE }}:${{ steps.extract_version.outputs.version }} $EXTRA_TAG | ||