diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index 7b72c83313..2cb93550de 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -131,23 +131,28 @@ jobs: - name: Create matrix id: set-matrix run: | + if "${{ github.event_name == 'schedule' }}" == "true"; then MATRIX="$(jq -c '.' <> $GITHUB_OUTPUT - name: Log config run: | @@ -292,21 +297,15 @@ jobs: # dist cache # the cache-key forces uploading of cache at least once a day, which ensures that # upstream dependency changes are captured regularly. - - name: Create date file for dist-newstyle cache key - id: cache-date - run: | - echo "value=$(date +%Y.%j)" >> $GITHUB_OUTPUT - uses: actions/cache@v3 name: Cache dist-newstyle with: path: | - ~/.cabal/packages - ~/.cabal/store dist-newstyle - key: ${{ matrix.os }}-${{ matrix.ghc }}-2-${{ steps.cache-date.outputs.value }}-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }} + key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}-2-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }} restore-keys: | - ${{ matrix.os }}-${{ matrix.ghc }}-2-${{ steps.cache-date.outputs.value }}- - ${{ matrix.os }}-${{ matrix.ghc }}-2- + ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}-2- + ${{ matrix.os }}-${{ matrix.ghc }}- # Build - name: Delete Freeze file if it exists @@ -331,7 +330,7 @@ jobs: with: bucket: "kadena-cabal-cache" region: "us-east-1" - folder: "${{ matrix.os }}-${{ matrix.ghc }}" + folder: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}" aws_access_key_id: "${{ secrets.kadena_cabal_cache_aws_access_key_id }}" aws_secret_access_key: "${{ secrets.kadena_cabal_cache_aws_secret_access_key }}" - name: Install build dependencies @@ -618,15 +617,13 @@ jobs: name: Build and publish docker image needs: [config, build] runs-on: ${{ matrix.os }} + if: "${{ github.event_name != 'schedule' }}" strategy: fail-fast: false matrix: # when adding more than one build, use a different package name or # different tags include: - - ghc: "9.6.4" - os: "ubuntu-20.04" - use-freeze-file: "false" - ghc: "9.6.4" os: "ubuntu-20.04" use-freeze-file: "true"