Keycloak

Форк
0
51 строка · 1.8 Кб
1
name: Maven Cache
2
description: Caches Maven artifacts
3

4
inputs:
5
  create-cache-if-it-doesnt-exist:
6
    description: > 
7
      Only those callers which fill the cache with the right contents should set this to true to avoid creating a cache
8
      which contains too few or too many entries.
9
    required: false
10
    default: false
11

12
runs:
13
  using: composite
14
  steps:
15
    - id: weekly-cache-key
16
      name: Key for weekly rotation of cache
17
      shell: bash
18
      run: echo "key=mvn-`date -u "+%Y-%U"`" >> $GITHUB_OUTPUT
19

20
    - id: cache-maven-repository
21
      name: Maven cache
22
      uses: actions/cache@v3
23
      if: inputs.create-cache-if-it-doesnt-exist == 'true'
24
      with:
25
        # Two asterisks are needed to make the follow-up exclusion work
26
        # see https://github.com/actions/toolkit/issues/713 for the upstream issue
27
        path: |
28
          ~/.m2/repository/*/*
29
          !~/.m2/repository/org/keycloak
30
        key: ${{ steps.weekly-cache-key.outputs.key }}
31

32
    - id: restore-maven-repository
33
      name: Maven cache
34
      uses: actions/cache/restore@v3
35
      if: inputs.create-cache-if-it-doesnt-exist == 'false'
36
      with:
37
        # Two asterisks are needed to make the follow-up exclusion work
38
        # see https://github.com/actions/toolkit/issues/713 for the upstream issue
39
        path: |
40
          ~/.m2/repository/*/*
41
          !~/.m2/repository/org/keycloak
42
        key: ${{ steps.weekly-cache-key.outputs.key }}
43

44
    - name: Cache Maven Wrapper
45
      uses: actions/cache@v3
46
      with:
47
        path: .mvn/wrapper/maven-wrapper.jar
48
        key: ${{ runner.os }}-maven-wrapper-${{ hashFiles('**/maven-wrapper.properties') }}
49
        # use a previously cached JAR file as something else besides the version could have changed in the file
50
        restore-keys: |
51
          ${{ runner.os }}-maven-wrapper-

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.