rshs 0.9.2

A lightweight HTTP + WebDAV file server
Documentation
name: Release

on:
  push:
    branches: [master]
    tags: [v*]
  pull_request:
    paths: ["./Dockerfile"]
  workflow_dispatch:

jobs:
  container:
    name: Build & Push Container Image
    uses: docker/github-builder/.github/workflows/build.yml@v1.10.0
    permissions:
      contents: read
      packages: write
      attestations: write
      id-token: write
    with:
      output: image
      push: ${{ github.event_name != 'pull_request' }}
      platforms: linux/amd64,linux/arm64
      meta-images: |
        docker.io/mogeko/rshs
        ghcr.io/mogeko/rshs
      meta-tags: |
        type=semver,pattern={{version}}
        type=semver,pattern={{major}}.{{minor}}
        type=semver,pattern={{major}}
        type=edge
        type=sha,format=short
    secrets:
      registry-auths: |
        - registry: docker.io
          username: ${{ vars.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
        - registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

  crate:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags/v')
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@v6.0.2
      - name: Authenticate to crates.io
        id: auth
        uses: rust-lang/crates-io-auth-action@v1.0.4
      - run: cargo publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}