Skip to content

Commit

Permalink
Modify the GitHub action and add a GHCR image.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mgrsc committed Oct 13, 2024
1 parent 650c789 commit 9924eb2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main-bpd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GAYHUB_USERNAME }}
password: ${{ secrets.CR_PAT }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -30,6 +37,8 @@ jobs:
UNIQUE_TAG="${TIMESTAMP}-${SHORT_SHA}"
echo "DOCKER_HUB_TAG=${{ secrets.DOCKER_IMAGE_NAME }}/llmer:${IMAGE_TAG}" >> $GITHUB_ENV
echo "DOCKER_HUB_UNIQUE_TAG=${{ secrets.DOCKER_IMAGE_NAME }}/llmer:${UNIQUE_TAG}" >> $GITHUB_ENV
echo "GAYHUB_TAG_UNIQUE=ghcr.io/${{ secrets.GAYHUB_IMAGE_NAME }}/llmer:${UNIQUE_TAG}" >> $GITHUB_ENV
echo "GAYHUB_TAG=ghcr.io/${{ secrets.GAYHUB_IMAGE_NAME }}/llmer:latest" >> $GITHUB_ENV
- name: Build and publish image
run: |
Expand All @@ -41,6 +50,8 @@ jobs:
--push \
--tag ${{ env.DOCKER_HUB_TAG }} \
--tag ${{ env.DOCKER_HUB_UNIQUE_TAG }} \
--tag ${{ env.GAYHUB_TAG }} \
--tag ${{ env.GAYHUB_TAG_UNIQUE }} \
.
- name: Deploy to main server
Expand Down

0 comments on commit 9924eb2

Please sign in to comment.