From e8f55e43724d80f724d1ba86f11b3e6e1285f17e Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 11 Mar 2026 20:14:04 +0530 Subject: [PATCH 1/3] feat: Automated Docker Image Pushing (GitHub Actions) --- .github/workflows/ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8c5b5e..3ef4718 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: permissions: contents: read + packages: write # --> Allows Github Actions to upload to the Container Registery jobs: lint-and-typecheck: @@ -37,6 +38,12 @@ jobs: needs: [lint-and-typecheck] steps: - uses: actions/checkout@v4 + - name: Login to Container Registery + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -45,8 +52,8 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: false # We only want to test the build, not push it to a registry yet - tags: systemcraft-web:latest + push: ${{ github.event_name != 'pull_request' }} + tags: ghcr.io/${{ github.repository }}/systemcraft-web:latest cache-from: type=gha cache-to: type=gha,mode=max build-args: | From 0e81331c19591c67298bead42314ec35a620bc13 Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 11 Mar 2026 20:33:26 +0530 Subject: [PATCH 2/3] fix: Syntax issues in the ci.yml file --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ef4718..6ff0a7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,11 +39,11 @@ jobs: steps: - uses: actions/checkout@v4 - name: Login to Container Registery - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 6f7493a9de17917a70c4eb5128d32ed6ace9d05b Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 11 Mar 2026 20:37:21 +0530 Subject: [PATCH 3/3] fix: force lowercase docker tags in ci workflow --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ff0a7a..6f593a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,13 +47,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + + - name: Lowercase Repository Name + run: | + echo "REPO=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} - name: Build Docker Image uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} - tags: ghcr.io/${{ github.repository }}/systemcraft-web:latest + tags: ghcr.io/${{ env.REPO }}/systemcraft-web:latest cache-from: type=gha cache-to: type=gha,mode=max build-args: |