Merge pull request #22 from maximkr/dependabot/gradle/minor-and-patch… #75
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 CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: docker-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Docker build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| # Dockerfile копирует .git внутрь сборки, а com.palantir.git-version | |
| # определяет version по тегам. При shallow clone тегов нет и в образ | |
| # попадает версия-заглушка вместо реальной. | |
| fetch-depth: 0 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build the Docker image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: false | |
| load: false | |
| tags: trackstudio/app:${{ github.sha }} | |
| # Кеш слоёв между прогонами: без него Gradle качает зависимости заново | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |