Skip to content

chore(deps): update apache-avro requirement in /relay #3

chore(deps): update apache-avro requirement in /relay

chore(deps): update apache-avro requirement in /relay #3

Workflow file for this run

name: Publish - Relay

Check failure on line 1 in .github/workflows/publish_relay.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish_relay.yml

Invalid workflow file

(Line: 83, Col: 9): Job 'merge' depends on unknown job 'extract_version'.
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