Skip to content

chore(hello-tracing-gateway): release version 1.3.5 #17

chore(hello-tracing-gateway): release version 1.3.5

chore(hello-tracing-gateway): release version 1.3.5 #17

Workflow file for this run

name: Release backend
on:
push:
tags:
- hello-tracing-backend/v*
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
toolchain:
runs-on: ubuntu-latest
env:
nightly: ${{(github.event.inputs.nightly == 'true' || github.event_name == 'schedule') && 'true' || ''}}
outputs:
toolchain: ${{steps.set_toolchain.outputs.toolchain}}
nightly_toolchain: ${{steps.set_toolchain.outputs.nightly_toolchain}}
steps:
- uses: actions/checkout@v4
- name: Set toolchain
id: set_toolchain
run: |
toolchain=$(grep channel rust-toolchain.toml | sed -r 's/channel = "(.*)"/\1/')
echo "using toolchain $toolchain"
echo "toolchain=$toolchain" >> "$GITHUB_OUTPUT"
if [[ $toolchain =~ ^nightly.* ]]; then
echo "using nightly_toolchain $toolchain"
echo "nightly_toolchain=$toolchain" >> "$GITHUB_OUTPUT"
else
echo "using nightly_toolchain nightly"
echo "nightly_toolchain=nightly" >> "$GITHUB_OUTPUT"
fi
release:
runs-on: ubuntu-latest
needs: [toolchain]
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Prepare metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: hseeberger/hello-tracing-backend
tags: |
type=match,pattern=hello-tracing-backend/v(\d.\d.\d),group=1
type=sha,prefix=,suffix=,format=long
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker build and push hello-tracing-backend
uses: docker/build-push-action@v6
with:
push: true
file: hello-tracing-backend/Dockerfile
build-args: RUST_VERSION=${{needs.toolchain.outputs.toolchain}}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}