Merge branch 'phase-5-webapp' #7
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
| # .github/workflows/docker-compose-ci.yml | |
| name: Build & Push (Compose/Bake) | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| # enable when you want release builds from tags | |
| # push: | |
| # tags: [ "v*" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Optional: quick sanity check that compose is at repo root | |
| - name: Show tree | |
| run: | | |
| pwd | |
| ls -la | |
| test -f docker-compose.yml && echo "compose found" || (echo "compose missing" && exit 1) | |
| - name: Build & Push with Bake (compose) | |
| uses: docker/bake-action@v4 | |
| with: | |
| files: | | |
| docker-compose.yml | |
| push: true | |
| # You can override or add tags/labels per-target with `set:` if needed | |
| # set: | | |
| # *.labels=org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} | |
| # *.tags=ghcr.io/hasanjaved-developer/centralized-logging/{{.target}}:edge |