diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml new file mode 100644 index 000000000..ddbb0af04 --- /dev/null +++ b/.github/workflows/build-image.yml @@ -0,0 +1,39 @@ +name: Build Claude Code Image + +on: + workflow_dispatch: + inputs: + version: + description: 'Image version tag' + required: true + default: 'latest' + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - 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: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: ./.github/actions/claude-code-action + push: true + tags: ghcr.io/mervinpraison/praisonai-claudecode:${{ inputs.version }} + cache-from: type=gha + cache-to: type=gha,mode=max + provenance: false \ No newline at end of file diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index ba64f09c7..941bee4b0 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -23,16 +23,13 @@ jobs: pull-requests: read issues: read id-token: write - packages: write + packages: read steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -40,15 +37,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: ./.github/actions/claude-code-action - push: true - tags: ghcr.io/mervinpraison/praisonai-claudecode:latest - cache-from: type=gha - cache-to: type=gha,mode=max - - name: Run Claude Code id: claude uses: ./.github/actions/claude-code-action