Skip to content

Commit

Permalink
Merge pull request #15 from twohoursonelife/discordjs14
Browse files Browse the repository at this point in the history
Move to GitHub Container Registry
  • Loading branch information
connorhsm authored Jul 24, 2022
2 parents 388d997 + ddf832e commit 8ba9e2a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
15 changes: 8 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- created

jobs:
Release-Docker:
Release-GHCR:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -16,7 +16,7 @@ jobs:
id: meta
uses: docker/metadata-action@v3
with:
images: connorhsmith/junior
images: ghcr.io/twohoursonelife/junior
tags: |
type=schedule
type=semver,pattern={{version}}
Expand All @@ -25,23 +25,24 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
- name: Login to GHCR
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}, connorhsmith/junior:latest
tags: ${{ steps.meta.outputs.tags }}, ghcr.io/twohoursonelife/junior:latest
labels: ${{ steps.meta.outputs.labels }}

Deploy-Production:
needs:
- Release-Docker
- Release-GHCR
- Deploy-Commands
runs-on: ubuntu-latest
environment: prod
Expand Down
4 changes: 2 additions & 2 deletions utils/deploy-junior.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!bin/bash

docker pull connorhsmith/junior:latest
docker pull ghcr.io/twohoursonelife/junior
docker stop junior
docker system prune -f
docker run -d --name=junior -e PROD_TOKEN=ABC connorhsmith/junior:latest
docker run -d --name=junior -e PROD_TOKEN=ABC ghcr.io/twohoursonelife/junior

0 comments on commit 8ba9e2a

Please sign in to comment.