chore(deps-dev): bump black from 25.1.0 to 25.9.0 #25
Workflow file for this run
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-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 | ||
| 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 }} | ||