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 }}