From e18cc2bfa3a7351aa2f169b42d19ed0a9a93dfcd Mon Sep 17 00:00:00 2001 From: Stephen Zweibel Date: Mon, 10 Aug 2026 10:15:43 -0400 Subject: [PATCH] ci: publish immutable container images to GHCR --- .github/workflows/publish-container.yml | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/publish-container.yml diff --git a/.github/workflows/publish-container.yml b/.github/workflows/publish-container.yml new file mode 100644 index 0000000..a8b530f --- /dev/null +++ b/.github/workflows/publish-container.yml @@ -0,0 +1,38 @@ +name: Publish container + +on: + workflow_dispatch: + +permissions: + contents: read + packages: write + +env: + IMAGE_NAME: ghcr.io/cuny-ai-lab/pdf-accessibility-app + +jobs: + publish: + name: Publish immutable image + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Check out source + uses: actions/checkout@v6 + + - name: Log in to GHCR + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Buildx + uses: docker/setup-buildx-action@v4 + + - name: Build and publish image + uses: docker/build-push-action@v7 + with: + context: . + push: true + build-args: VITE_APP_BASE_PATH=/pdf-accessibility/ + tags: ${{ env.IMAGE_NAME }}:${{ github.sha }}