Skip to content

chore(deps): update rust crate tower to v0.5.2 #2177

chore(deps): update rust crate tower to v0.5.2

chore(deps): update rust crate tower to v0.5.2 #2177

Workflow file for this run

name: Build and upload Docker image
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
release-please:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
outputs:
indexer-service-rs: ${{ steps.release-please.outputs['crates/service--tag_name'] }}
indexer-tap-agent: ${{ steps.release-please.outputs['crates/tap-agent--tag_name'] }}
steps:
- name: Release please
id: release-please
uses: googleapis/release-please-action@v4
builds-linux:
runs-on: ubuntu-latest
needs: release-please
strategy:
matrix:
target: [indexer-service-rs, indexer-tap-agent]
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Extract version from tag
id: extract_version
run: |
TAG_NAME="${{ needs.release-please.outputs[matrix.target] }}"
# Extract the version part from tags with prefix "${{ matrix.target }}-" using a regex pattern
if [[ "$TAG_NAME" =~ ^${{ matrix.target }}-(.*)$ ]]; then
VERSION="${BASH_REMATCH[1]}"
else
VERSION=""
fi
echo $VERSION
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
with:
# list of Docker images to use as base name for tags
images: |
${{ env.REGISTRY }}/${{matrix.target}}
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}},value=${{steps.extract_version.outputs.version}}
type=semver,pattern={{major}}.{{minor}},value=${{steps.extract_version.outputs.version}}
type=semver,pattern={{major}}.{{minor}}.{{patch}},value=${{steps.extract_version.outputs.version}}
type=semver,pattern={{major}},value=${{steps.extract_version.outputs.version}}
type=semver,pattern=v{{version}},value=${{steps.extract_version.outputs.version}}
type=semver,pattern=v{{major}}.{{minor}},value=${{steps.extract_version.outputs.version}}
type=semver,pattern=v{{major}}.{{minor}}.{{patch}},value=${{steps.extract_version.outputs.version}}
type=semver,pattern=v{{major}},value=${{steps.extract_version.outputs.version}}
type=sha
- name: Log in to the Container registry
uses: docker/login-action@7ca345011ac4304463197fac0e56eab1bc7e6af0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6
with:
context: ./
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
tags: ${{ steps.meta.outputs.tags }}
file: Dockerfile.${{ matrix.target }}