name: Build and push image on: push: branches: [main] tags: ['v*'] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: registry: gitea.thewrightserver.net username: ${{ gitea.repository_owner }} password: ${{ secrets.REGISTRY_TOKEN }} - id: meta uses: docker/metadata-action@v5 with: images: gitea.thewrightserver.net/josh/apothecary tags: | type=ref,event=branch type=sha,prefix=,format=short type=semver,pattern={{version}} type=raw,value=latest,enable={{is_default_branch}} - uses: docker/build-push-action@v5 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}