chore: manage shared workspace deps through the pnpm catalog (#7) #22
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 images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set build metadata | |
| run: echo "BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_ENV" | |
| - name: Build and push API image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: apps/api/Dockerfile | |
| push: true | |
| build-args: | | |
| GIT_SHA=${{ github.sha }} | |
| BUILD_TIME=${{ env.BUILD_TIME }} | |
| tags: | | |
| ghcr.io/cnodejs/cnode-api:sha-${{ github.sha }} | |
| ghcr.io/cnodejs/cnode-api:latest | |
| - name: Build and push Web image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: apps/web/Dockerfile | |
| push: true | |
| build-args: | | |
| GIT_SHA=${{ github.sha }} | |
| BUILD_TIME=${{ env.BUILD_TIME }} | |
| tags: | | |
| ghcr.io/cnodejs/cnode-web:sha-${{ github.sha }} | |
| ghcr.io/cnodejs/cnode-web:latest |