From e8f55e43724d80f724d1ba86f11b3e6e1285f17e Mon Sep 17 00:00:00 2001 From: Shashank Date: Wed, 11 Mar 2026 20:14:04 +0530 Subject: [PATCH] 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: |