Skip to content

Commit af53728

Browse files
authored
ghcrpkgs (#23)
* ghcrpkgs * image name * readme
1 parent 1acfe26 commit af53728

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.github/workflows/release.yaml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,19 @@ jobs:
7171
# Allows pushing to the GitHub Container Registry
7272
packages: write
7373

74+
env:
75+
IMAGE_NAME: ${{ github.repository }}-receiver
76+
7477
steps:
7578
- uses: actions/checkout@v3
7679

77-
# log in to ecr
78-
- name: Configure AWS credentials
79-
uses: aws-actions/configure-aws-credentials@v2
80-
with:
81-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
82-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
83-
aws-region: us-east-1
84-
- name: log in to ecr
85-
uses: aws-actions/amazon-ecr-login@v1
86-
with:
87-
registry: 413471642455.dkr.ecr.us-east-1.amazonaws.com
88-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
89-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
90-
9180
- name: Docker meta
9281
id: meta
9382
uses: docker/metadata-action@v4
9483
with:
9584
images: |
9685
413471642455.dkr.ecr.us-east-1.amazonaws.com/spotify-remote-receiver
86+
ghcr.io/${{ env.IMAGE_NAME }}
9787
tags: |
9888
type=ref,event=branch
9989
type=ref,event=pr
@@ -103,6 +93,28 @@ jobs:
10393
# set latest tag for default branch
10494
type=raw,value=latest,enable={{is_default_branch}}
10595
96+
# log in to ecr for private image
97+
- name: Configure AWS credentials
98+
uses: aws-actions/configure-aws-credentials@v2
99+
with:
100+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
101+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
102+
aws-region: us-east-1
103+
- name: log in to ecr
104+
uses: aws-actions/amazon-ecr-login@v1
105+
with:
106+
registry: 413471642455.dkr.ecr.us-east-1.amazonaws.com
107+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
108+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
109+
110+
# also do github packages
111+
- name: Log in to the Github Packages Container registry
112+
uses: docker/login-action@v2
113+
with:
114+
registry: ghcr.io
115+
username: ${{ github.actor }}
116+
password: ${{ secrets.GITHUB_TOKEN }}
117+
106118
- uses: depot/setup-action@v1
107119
- uses: depot/build-push-action@v1
108120
with:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is a self-hosted Discord bot that allows users to stream to it as if it was
77
## Getting started
88

99
1. Create a Discord app and bot.
10-
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.
10+
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.
1111

1212
- NOTE: if you end up exposing this service over the internet, it's strongly recommended to use https!
1313
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.

0 commit comments

Comments
 (0)