Skip to content

chore(deps-dev): bump ruff from 0.13.0 to 0.13.2 #28

chore(deps-dev): bump ruff from 0.13.0 to 0.13.2

chore(deps-dev): bump ruff from 0.13.0 to 0.13.2 #28

name: publish-on-semrel
on:
workflow_run:
workflows: ["semantic-release"]
types: [completed]
workflow_dispatch:
inputs:
tag:
description: Tag to publish (e.g. v0.4.36)
required: false
type: string
permissions:
contents: read
packages: write
jobs:
publish:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success') }}
runs-on: ubuntu-latest
steps:
- name: Checkout with tags
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Resolve TAG
id: tag
shell: bash
run: |
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
else
git fetch --tags --force
TAG=$(git describe --tags --abbrev=0)
echo "TAG=$TAG" >> $GITHUB_ENV
fi
echo "Resolved TAG=$TAG"
- name: Sync version from TAG into pyproject.toml
shell: bash
env:
TAG: ${{ env.TAG }}
run: |
VER="${TAG#v}"
python - <<'PY'
import os,re,pathlib

Check failure on line 49 in .github/workflows/publish-on-semrel.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-on-semrel.yml

Invalid workflow file

You have an error in your yaml syntax on line 49
ver=os.environ["VER"]
p=pathlib.Path("pyproject.toml")
t=p.read_text()
t=re.sub(r'(?m)^(\s*version\s*=\s*")\d+\.\d+\.\d+(")', rf'\1{ver}\2', t)
p.write_text(t)
print("synced version:", ver)
PY
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Compute lowercase image name
shell: bash
run: |
OWNER="${GITHUB_REPOSITORY_OWNER,,}"
echo "IMAGE=ghcr.io/${OWNER}/diff-risk-dashboard" >> $GITHUB_ENV
- name: Build & Push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.IMAGE }}:${{ env.TAG }}