mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
ci: optimize workflow caching and add concurrency controls (#7331)
This commit is contained in:
parent
711f4e6a25
commit
f0533450be
6 changed files with 12 additions and 3 deletions
2
.github/actions/setup/action.yml
vendored
2
.github/actions/setup/action.yml
vendored
|
|
@ -34,7 +34,7 @@ runs:
|
|||
if [ ${{ inputs.installDependencies }} = true ]; then
|
||||
echo "cache=pnpm" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "cache=" >> "$GITHUB_ENV"
|
||||
echo "cache=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: install pnpm
|
||||
|
|
|
|||
1
.github/workflows/build-and-dockerize.yaml
vendored
1
.github/workflows/build-and-dockerize.yaml
vendored
|
|
@ -169,6 +169,7 @@ jobs:
|
|||
source: .
|
||||
set: |
|
||||
*.cache-from=type=gha,ignore-error=true,scope=${{ steps.docker_cache_key.outputs.replaced }}
|
||||
*.cache-from=type=gha,ignore-error=true,scope=refs_heads_main-${{ inputs.targets }}-${{ matrix.platform == 'linux/amd64' && 'linux_amd64' || 'linux_arm64' }}
|
||||
*.cache-to=type=gha,mode=max,ignore-error=true,scope=${{ steps.docker_cache_key.outputs.replaced }}
|
||||
|
||||
- name: docker details pr comment
|
||||
|
|
|
|||
2
.github/workflows/lint.yaml
vendored
2
.github/workflows/lint.yaml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
node_modules/.cache/prettier
|
||||
key:
|
||||
lint-cache-${{ hashFiles('**/pnpm-lock.yaml', 'packages/web/*/tailwind.config.ts',
|
||||
'tsconfig.eslint.json', 'packages/web/app/tsconfig.json') }}-${{github.sha}}
|
||||
'tsconfig.eslint.json', 'packages/web/app/tsconfig.json') }}
|
||||
restore-keys: |
|
||||
lint-cache-${{ hashFiles('**/pnpm-lock.yaml', 'packages/web/*/tailwind.config.ts',
|
||||
'tsconfig.eslint.json', 'packages/web/app/tsconfig.json') }}-
|
||||
|
|
|
|||
4
.github/workflows/main.yaml
vendored
4
.github/workflows/main.yaml
vendored
|
|
@ -4,6 +4,10 @@ on:
|
|||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ci-main
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Release NPM packages and tarballs
|
||||
package:
|
||||
|
|
|
|||
4
.github/workflows/pr.yaml
vendored
4
.github/workflows/pr.yaml
vendored
|
|
@ -2,6 +2,10 @@ name: pr
|
|||
on:
|
||||
pull_request: {}
|
||||
|
||||
concurrency:
|
||||
group: pr-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
HIVE_TOKEN: ${{ secrets.HIVE_TOKEN }}
|
||||
|
||||
|
|
|
|||
2
.github/workflows/prettier.yaml
vendored
2
.github/workflows/prettier.yaml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
path: |
|
||||
.eslintcache
|
||||
node_modules/.cache/prettier
|
||||
key: lint-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
|
||||
key: lint-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
lint-cache-${{ hashFiles('**/pnpm-lock.yaml') }}-
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue