Docker Image #58
Workflow file for this run
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: Docker Image | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-push: | |
| name: Build & Push Generic Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract version from tag | |
| id: meta | |
| run: | | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| echo "version=${TAG_VERSION}" >> "$GITHUB_OUTPUT" | |
| - name: Build vibrate.sh | |
| env: | |
| VERSION: ${{ steps.meta.outputs.version }} | |
| run: make build VERSION="$VERSION" | |
| - name: Generate Dockerfile (generic mode) | |
| run: build/vibrate.sh --generic --export-dockerfile Dockerfile | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
| build-args: | | |
| USERNAME=claude-user | |
| HOST_UID=1000 | |
| HOST_GID=1000 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |