diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 259b4cf..808f1d0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,18 +1,23 @@ name: Docker Build and Push on: + workflow_dispatch: push: branches: - main - master +env: + REGISTRY_NAME: ghcr.io + IMAGE_NAME: nostr-rs-relay + jobs: - ci: - name: CI - uses: ./.github/workflows/ci.yml + # ci: + # name: CI + # uses: ./.github/workflows/ci.yml build_and_push: - needs: [ci] + # needs: [ci] name: Build and Push runs-on: ubuntu-latest steps: @@ -32,13 +37,29 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push + - name: Collecting Metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY_NAME }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + + - name: Building And Pushing Image id: docker_build uses: docker/build-push-action@v4 with: context: . + file: ./Dockerfile push: true - tags: ghcr.io/${{ github.repository_owner }}/nostr-rs-relay:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # - name: Build and push + # id: docker_build + # uses: docker/build-push-action@v4 + # with: + # context: . + # push: true + # tags: ghcr.io/${{ github.repository_owner }}/nostr-rs-relay:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file diff --git a/src/server.rs b/src/server.rs index 3c2b9f2..be1073b 100644 --- a/src/server.rs +++ b/src/server.rs @@ -266,73 +266,82 @@ async fn handle_web_request( } let html = r#" - -
- - - - -