Skip to content

Commit

Permalink
dbeaver/dbeaver-devops#1525 reuse workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud committed Oct 15, 2024
1 parent 2924cb9 commit 69af4ac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 64 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/backend-lint.yml

This file was deleted.

27 changes: 4 additions & 23 deletions .github/workflows/common-cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cleanup checks
name: Cleanup

on:
pull_request:
Expand All @@ -9,25 +9,6 @@ on:

jobs:
delete-caches:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache keys"
cacheKeys=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
# Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeys
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: ${{ github.event_name == 'pull_request' && format('refs/pull/{0}/merge', github.event.pull_request.number) || 'refs/heads/main' }}
name: Cleanup
uses: dbeaver/dbeaver-common/.github/workflows/cleanup-caches.yml@devel
secrets: inherit
7 changes: 5 additions & 2 deletions .github/workflows/push-pr-devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: CI

on:
pull_request:
branches: [devel]
types:
- opened
- synchronize
- reopened
push:
branches: [devel]

Expand All @@ -28,7 +31,7 @@ jobs:

lint-server:
name: Server
uses: ./.github/workflows/backend-lint.yml
uses: dbeaver/dbeaver-common/.github/workflows/java-checkstyle.yml@devel
secrets: inherit

lint-frontend:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"*.css": "postcss"
},

"java.checkstyle.configuration": "${workspaceFolder}/../dbeaver-common/dbeaver-checkstyle-config.xml",
"java.checkstyle.configuration": "${workspaceFolder}/../dbeaver-common/.github/dbeaver-checkstyle-config.xml",
"java.checkstyle.version": "10.12.0"
}

0 comments on commit 69af4ac

Please sign in to comment.