Skip to content

Commit

Permalink
ghcrpkgs (#23)
Browse files Browse the repository at this point in the history
* ghcrpkgs

* image name

* readme
  • Loading branch information
asg0451 authored Jun 2, 2023
1 parent 1acfe26 commit af53728
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<your-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=<your-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.
Expand Down

0 comments on commit af53728

Please sign in to comment.