Skip to content

Commit

Permalink
GitHub actions GHCR (#28) (#29)
Browse files Browse the repository at this point in the history
GitHub actions ghcr (#28)
  • Loading branch information
seemywingz authored Mar 30, 2023
1 parent 851d5b9 commit 2e7b6f4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/dockerBuildX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,44 @@ on:
- "**"

env:
IMAGE_VERSION: edge
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout
- name: GitHub Checkout
uses: actions/checkout@v3

- name: Set up QEMU
- name: Docker Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
- name: Docker Set up Buildx
uses: docker/setup-buildx-action@v2

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

- name: Generate image Version
run: |
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/develop ]]; then
VERSION=${GITHUB_REF#refs/heads/}
else
VERSION=latest
fi
echo "IMAGE_VERSION=${VERSION}"
echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
- name: Docker Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: linux/amd64,linux/arm/v7
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ponder:${{ env.IMAGE_VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion cmd/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ const openai_endpoint = "https://api.openai.com/v1/"

const printify_endpoint = "https://api.printify.com/v1/"

const discord_BotSystemMessage = "You are a helpful assistant Discord Chat Bot"
const discord_BotSystemMessage = "You are Ponder. Ponder is here to help you with your Discord needs. Please be respectful and courteous when interacting with Ponder. Ponder will not tolerate any form of harassment, bullying, or discrimination. If you have any questions or concerns, please let us know. Thank you for using Ponder!"
4 changes: 2 additions & 2 deletions helm/values_development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
replicaCount: 1

image:
repository: disciplesofai/ponder
repository: ghcr.io/seemywingz/ponder
pullPolicy: Always
tag: "development"
tag: development

imagePullSecrets: []
nameOverride: ""
Expand Down
2 changes: 1 addition & 1 deletion helm/values_production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: disciplesofai/ponder
repository: ghcr.io/seemywingz/ponder
pullPolicy: Always
tag: "v0.1.2"

Expand Down

0 comments on commit 2e7b6f4

Please sign in to comment.