Skip to content

Commit

Permalink
Merge pull request #192 from seanmorley15/development
Browse files Browse the repository at this point in the history
Docker Hub
  • Loading branch information
seanmorley15 authored Aug 15, 2024
2 parents 83e907a + 28b68af commit f846f46
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 6 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/backend-latest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload latest backend image to GHCR
name: Upload latest backend image to GHCR and Docker Hub

on:
push:
Expand All @@ -24,11 +24,23 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker image
run: docker build -t $IMAGE_NAME:latest ./backend

- name: Tag Docker image
- name: Tag Docker image for GHCR
run: docker tag $IMAGE_NAME:latest ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest

- name: Tag Docker image for Docker Hub
run: docker tag $IMAGE_NAME:latest ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest

- name: Push Docker image to GHCR
run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest

- name: Push Docker image to Docker Hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest
14 changes: 13 additions & 1 deletion .github/workflows/backend-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,23 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker image
run: docker build -t $IMAGE_NAME:${{ github.event.release.tag_name }} ./backend

- name: Tag Docker image
- name: Tag Docker image for GHCR
run: docker tag $IMAGE_NAME:${{ github.event.release.tag_name }} ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:${{ github.event.release.tag_name }}

- name: Tag Docker image for Docker Hub
run: docker tag $IMAGE_NAME:${{ github.event.release.tag_name }} ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:${{ github.event.release.tag_name }}

- name: Push Docker image to GHCR
run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:${{ github.event.release.tag_name }}

- name: Push Docker image to Docker Hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:${{ github.event.release.tag_name }}
16 changes: 14 additions & 2 deletions .github/workflows/frontend-latest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload latest frontend image to GHCR
name: Upload latest frontend image to GHCR and Docker Hub

on:
push:
Expand All @@ -24,11 +24,23 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker image
run: docker build -t $IMAGE_NAME:latest ./frontend

- name: Tag Docker image
- name: Tag Docker image for GHCR
run: docker tag $IMAGE_NAME:latest ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest

- name: Tag Docker image for Docker Hub
run: docker tag $IMAGE_NAME:latest ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest

- name: Push Docker image to GHCR
run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest

- name: Push Docker image to Docker Hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest
14 changes: 13 additions & 1 deletion .github/workflows/frontend-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,23 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker image
run: docker build -t $IMAGE_NAME:${{ github.event.release.tag_name }} ./frontend

- name: Tag Docker image
- name: Tag Docker image for GHCR
run: docker tag $IMAGE_NAME:${{ github.event.release.tag_name }} ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:${{ github.event.release.tag_name }}

- name: Tag Docker image for Docker Hub
run: docker tag $IMAGE_NAME:${{ github.event.release.tag_name }} ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:${{ github.event.release.tag_name }}

- name: Push Docker image to GHCR
run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:${{ github.event.release.tag_name }}

- name: Push Docker image to Docker Hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:${{ github.event.release.tag_name }}
1 change: 1 addition & 0 deletions backend/server/users/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers


try:
from allauth.account import app_settings as allauth_account_settings
from allauth.account.adapter import get_adapter
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export let appVersion = 'Web v0.5.1';
export let versionChangelog = 'https://github.com/seanmorley15/AdventureLog/releases/tag/v0.5.1';
export let appTitle = 'AdventureLog';
export let copyrightYear = '2024';
// config for about modal

0 comments on commit f846f46

Please sign in to comment.