diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9cc1c27..f24074a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -71,29 +71,19 @@ jobs: # Allows pushing to the GitHub Container Registry packages: write + env: + IMAGE_NAME: ${{ github.repository }}-receiver + steps: - uses: actions/checkout@v3 - # log in to ecr - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - name: log in to ecr - uses: aws-actions/amazon-ecr-login@v1 - with: - registry: 413471642455.dkr.ecr.us-east-1.amazonaws.com - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Docker meta id: meta uses: docker/metadata-action@v4 with: images: | 413471642455.dkr.ecr.us-east-1.amazonaws.com/spotify-remote-receiver + ghcr.io/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch type=ref,event=pr @@ -103,6 +93,28 @@ jobs: # set latest tag for default branch type=raw,value=latest,enable={{is_default_branch}} + # log in to ecr for private image + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + - name: log in to ecr + uses: aws-actions/amazon-ecr-login@v1 + with: + registry: 413471642455.dkr.ecr.us-east-1.amazonaws.com + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + # also do github packages + - name: Log in to the Github Packages Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: depot/setup-action@v1 - uses: depot/build-push-action@v1 with: diff --git a/README.md b/README.md index fcaa81d..f3bafb3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is a self-hosted Discord bot that allows users to stream to it as if it was ## Getting started 1. Create a Discord app and bot. -1. Run the `receiver` Docker image either locally or on a server, such as via: `$ docker run -p8080:8080 -e DISCORD_TOKEN= TODO_image_name`, or via docker-compose, k8s, etc. It is intended to run as a persistent service. The image supports x86_64 and arm64 architectures. +1. Run the `receiver` [Docker image](https://github.com/asg0451/spotify-remote/pkgs/container/spotify-remote-receiver) either locally or on a server, such as via: `$ docker run -p8080:8080 -e DISCORD_TOKEN= TODO_image_name`, or via docker-compose, k8s, etc. It is intended to run as a persistent service. The image supports x86_64 and arm64 architectures. - NOTE: if you end up exposing this service over the internet, it's strongly recommended to use https! 1. Invite the bot to your server. Make sure it has sufficient permissions to join voice channels, speak, send messages, do slash commands, and read message contents.