Revision fb87d7dff80139f56f3dd3c37b58e1e9cc79f02d authored by Andrey Zhavoronkov on 14 June 2023, 21:13:38 UTC, committed by GitHub on 14 June 2023, 21:13:38 UTC
<!-- Raise an issue to propose your change
(https://github.com/opencv/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution
guide](https://opencv.github.io/cvat/docs/contributing/). -->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
<!-- Why is this change required? What problem does it solve? If it
fixes an open
issue, please link to the issue here. Describe your changes in detail,
add
screenshots. -->

### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->
Manually with docker-compose.https.yml config enabled

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [ ] I have added a description of my changes into the
[CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md)
file
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] I have linked related issues (see [GitHub docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [ ] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.

---------

Co-authored-by: Nikita Manovich <nikita@cvat.ai>
1 parent b19e925
Raw File
cache.yml
name: Cache
on:
  push:
    branches:
      - 'develop'

jobs:
  get-sha:
    uses: ./.github/workflows/search-cache.yml

  Caching_CVAT:
    needs: get-sha
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      REPO: ${{ github.repository }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - uses: actions/cache@v3
        id: server-cache-action
        with:
          path: /tmp/cvat_cache_server
          key: ${{ runner.os }}-build-server-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-build-server-${{ needs.get-sha.outputs.sha }}
            ${{ runner.os }}-build-server-

      - uses: actions/cache@v3
        id: ui-cache-action
        with:
          path: /tmp/cvat_cache_ui
          key: ${{ runner.os }}-build-ui-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-build-ui-${{ needs.get-sha.outputs.sha }}
            ${{ runner.os }}-build-ui-

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Caching CVAT Server
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ./Dockerfile
          cache-from: type=local,src=/tmp/cvat_cache_server
          cache-to: type=local,dest=/tmp/cvat_cache_server-new

      - name: Caching CVAT UI
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ./Dockerfile.ui
          cache-from: type=local,src=/tmp/cvat_cache_ui
          cache-to: type=local,dest=/tmp/cvat_cache_ui-new

      - name: Moving cache
        run: |
          rm -rf /tmp/cvat_cache_server
          mv /tmp/cvat_cache_server-new /tmp/cvat_cache_server

          rm -rf /tmp/cvat_cache_ui
          mv /tmp/cvat_cache_ui-new /tmp/cvat_cache_ui
back to top