-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: support docker-based deployment workflow #3
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3584a2b
feat: set up workflow to publish build to ghcr
dustin-jw c9a2862
chore: update go version and dependencies
dustin-jw 326010e
chore: set up docker-compose configs for local dev/prod
dustin-jw 853faca
docs: update readme with docker details
dustin-jw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
name: Deploy | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: Release Production Build | ||
name: Create build artifact | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Deploy to Heroku | ||
uses: akhileshns/heroku-deploy@v3.12.12 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | ||
heroku_app_name: "sparkbox-reaction-bot" | ||
heroku_email: ${{ secrets.USER_EMAIL }} | ||
usedocker: true | ||
docker_heroku_process_type: worker | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build image | ||
run: | | ||
docker build . --tag ghcr.io/sparkbox/reaction-bot:latest | ||
docker push ghcr.io/sparkbox/reaction-bot:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: '3.8' | ||
services: | ||
reaction_bot: | ||
image: ghcr.io/sparkbox/reaction-bot:latest | ||
container_name: reaction_bot | ||
restart: always | ||
env_file: | ||
- .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: '3.8' | ||
services: | ||
reaction_bot: | ||
build: | ||
context: . | ||
container_name: reaction_bot | ||
restart: always | ||
env_file: | ||
- .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
module github.com/sparkbox/reaction-bot | ||
|
||
go 1.12 | ||
go 1.22 | ||
|
||
require github.com/jordanleven/reaction-bot v1.1.0 | ||
|
||
require ( | ||
github.com/fatih/color v1.10.0 // indirect | ||
github.com/go-test/deep v1.0.7 // indirect | ||
github.com/jordanleven/reaction-bot v1.1.0 | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/gorilla/websocket v1.4.2 // indirect | ||
github.com/joho/godotenv v1.3.0 // indirect | ||
github.com/mattn/go-colorable v0.1.8 // indirect | ||
github.com/mattn/go-isatty v0.0.12 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/slack-go/slack v0.8.2 // indirect | ||
github.com/stretchr/testify v1.7.0 // indirect | ||
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect | ||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be specifying the prod configuration here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption was that we'll just have a
.env
file anddocker-compose.yml
that matches the prod config in the repo. I think that's more or less what we're doing with sparkpress.