chore: update GitHub Actions to Node.js 24 compatible versions #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push Image | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.2 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4.1.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Image with buildah script | |
| id: build | |
| env: | |
| STORAGE_DRIVER: vfs | |
| run: | | |
| # Extract <owner>/<repository-name> in lower case | |
| REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]') | |
| # Run the build script | |
| VERSION=$(./devops/build-image.sh -repo-name $REPO_NAME | tail -n2 | head -n1 | cut -d: -f2) | |
| # Tag the image for GHCR | |
| buildah tag claude-code \ | |
| "ghcr.io/$REPO_NAME/claude-code:$VERSION" \ | |
| "ghcr.io/$REPO_NAME/claude-code:latest" | |
| echo "repo_name=$REPO_NAME" >> "$GITHUB_OUTPUT" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Test image | |
| run: ./tests/test-image.sh "${{ steps.build.outputs.version }}" | |
| - name: Push to GitHub Container Registry | |
| run: | | |
| buildah push "ghcr.io/${{ steps.build.outputs.repo_name }}/claude-code:${{ steps.build.outputs.version }}" | |
| buildah push "ghcr.io/${{ steps.build.outputs.repo_name }}/claude-code:latest" |