feat: add 6 truth-layer route modules to CRUD service (#129) #105
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-push | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| REGISTRY: ghcr.io/${{ github.repository_owner }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build images | |
| run: | | |
| registry=$(echo "$REGISTRY" | tr '[:upper:]' '[:lower:]') | |
| for d in apps/*; do | |
| [ -d "$d" ] || continue | |
| [ -f "$d/src/Dockerfile" ] || continue | |
| image_name=$(basename "$d") | |
| docker build -t "$registry/$image_name:latest" -f "$d/src/Dockerfile" "$d/src" | |
| done | |
| push: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| env: | |
| REGISTRY: ghcr.io/${{ github.repository_owner }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push images | |
| run: | | |
| registry=$(echo "$REGISTRY" | tr '[:upper:]' '[:lower:]') | |
| for d in apps/*; do | |
| [ -d "$d" ] || continue | |
| [ -f "$d/src/Dockerfile" ] || continue | |
| image_name=$(basename "$d") | |
| docker build -t "$registry/$image_name:latest" -f "$d/src/Dockerfile" "$d/src" | |
| docker push "$registry/$image_name:latest" | |
| done |