This repository was archived by the owner on Aug 26, 2026. It is now read-only.
Fix Chaturbate redirects and profile source detection #98
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: Fast checks / publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| platforms: | |
| description: Docker platforms to publish | |
| required: true | |
| default: linux/amd64,linux/arm64 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quick-checks: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Fast syntax checks | |
| run: | | |
| python3 -m compileall -q app tests | |
| sh -n docker/entrypoint.sh | |
| build-and-push: | |
| if: github.event_name == 'workflow_dispatch' || github.ref_name == 'main' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Compute version (YEAR.WEEK.N) | |
| id: version | |
| run: | | |
| YEAR=$(date -u +%Y) | |
| WEEK=$(date -u +%V) | |
| # Remove leading zero for clean version number | |
| WEEK_NUM=$((10#$WEEK)) | |
| WEEK_PAD=$(printf "%02d" "$WEEK_NUM") | |
| # Find existing releases for this year.week prefix | |
| PREFIX="${YEAR}.${WEEK_PAD}" | |
| LATEST=$(gh release list --limit 100 --json tagName -q \ | |
| "[.[] | select(.tagName | startswith(\"${PREFIX}.\"))] | length") | |
| N=$(( LATEST + 1 )) | |
| VERSION="${PREFIX}.${N}" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Computed version: $VERSION" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up QEMU (multi-platform) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/raccommode/p-streamrec | |
| tags: | | |
| type=raw,value=${{ steps.version.outputs.version }} | |
| type=raw,value=latest,enable=${{ github.ref_name == 'main' }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| platforms: ${{ github.event_name == 'workflow_dispatch' && inputs.platforms || 'linux/amd64,linux/arm64' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| APP_VERSION=${{ steps.version.outputs.version }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Create GitHub Release | |
| if: github.ref_name == 'main' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: v${{ steps.version.outputs.version }} | |
| generate_release_notes: true |