Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/actions/free-disk-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Free Disk Space
description: Remove unnecessary software to free disk space for Docker builds
runs:
using: composite
steps:
- run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f
shell: bash
6 changes: 4 additions & 2 deletions .github/workflows/NOTICE-year-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@

name: NOTICE-year-check
on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
notice-year-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: check the NOTICE file
run: grep $(date +"%Y") NOTICE
6 changes: 4 additions & 2 deletions .github/workflows/asf-header-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ name: check-Apache-license-header
on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-ASF-header:
name: check Apache license header
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check License Header
uses: apache/skywalking-eyes@main
2 changes: 1 addition & 1 deletion .github/workflows/auto-cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Auto Cherry Pick
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
name: Build lake-builder image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
Expand Down
103 changes: 34 additions & 69 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,19 @@ jobs:
name: Build and Push devlake builder
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/free-disk-space
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}
- name: Build and push lake image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
Expand All @@ -65,26 +58,19 @@ jobs:
name: Build and Push devlake base
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/free-disk-space
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}
- name: Build and push lake image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
Expand All @@ -101,33 +87,26 @@ jobs:
matrix:
platform: ["arm64", "amd64"]
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/free-disk-space
- name: Get short sha
id: get_short_sha
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: /tmp/devlake-build-cache-${{ matrix.platform }}
key: buildx-devlake-build-cache-${{ github.run_id }}-${{ matrix.platform }}
- name: Build and cache lake build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ./backend
push: false
Expand All @@ -153,32 +132,25 @@ jobs:
name: Build and Push devlake image
runs-on: ubuntu-latest
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/free-disk-space
- name: Get short sha
id: get_short_sha
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: /tmp/devlake-build-cache-amd64
key: buildx-devlake-build-cache-${{ github.run_id }}-amd64
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: /tmp/devlake-build-cache-arm64
key: buildx-devlake-build-cache-${{ github.run_id }}-arm64
Expand All @@ -194,7 +166,7 @@ jobs:
echo "TAGS=${image_name}:${{ github.ref_name }}_${{ needs.get-timestamp.outputs.timestamp }}_${{ steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT
fi
- name: Build and push lake image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
Expand All @@ -209,7 +181,7 @@ jobs:
TAG=${{ github.ref_name }}
SHA=${{ steps.get_short_sha.outputs.SHORT_SHA }}
- name: Clear cache
uses: actions/github-script@v6
uses: actions/github-script@v7
if: always()
with:
script: |
Expand Down Expand Up @@ -240,24 +212,17 @@ jobs:
image: devlake-dashboard
context: grafana
steps:
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
docker system prune -af
docker volume prune -f
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/free-disk-space
- name: Get short sha
id: get_short_sha
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}
Expand All @@ -273,7 +238,7 @@ jobs:
echo "TAGS=${image_name}:${{ github.ref_name }}_${{ needs.get-timestamp.outputs.timestamp }}_${{ steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT
fi
- name: Build and push ${{ matrix.build.name }} image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ${{ matrix.build.context }}
push: true
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ on:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
codespell:
name: Check for spelling errors
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/commit-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@

name: lint-commit-message
on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
commit-msg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache lint-commit-message
id: cache-lint-commit-message
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: lint-commit-message
key: ${{ runner.os }}-lint-commit-message
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/config-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ on:
branches: [ main ]
paths:
- 'config-ui/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,20 @@ on:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
# TODO: Pin to specific version tag for reproducibility (e.g., mericodev/lake-builder:builder-vX.X.X)
container: mericodev/lake-builder:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cache golangci-lint
id: cache-golangci-lint
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: golangci-lint
key: ${{ runner.os }}-backend-golangci-lint
Expand All @@ -44,5 +48,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.53.3
version: v1.63.4
working-directory: ./backend
6 changes: 4 additions & 2 deletions .github/workflows/grafana-dashboards-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ on:
branches:
- main
- release-*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-grafana-dashboards:
name: check grafana dashboards
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check grafana dashboards whether using mysql uid
run: |
if grep '"type": "mysql"' grafana/dashboards/*; then
Expand Down
Loading
Loading