aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authoryulai.li <blacktear23@gmail.com>2022-06-26 22:43:37 +0800
committeryulai.li <blacktear23@gmail.com>2022-06-26 22:43:37 +0800
commit46e0b629e529f3aff535f90dd25eb719adf1c0d0 (patch)
tree734125b48b6d96f8796a2b89b924312cd169ef0e /.github
parenta5bd0b3a1644a77dcc0b9ff41c4ce8eb3ea0d566 (diff)
parentdc59ccd110a321db7d0b0480631aa95a3d9ba7e6 (diff)
downloadseaweedfs-46e0b629e529f3aff535f90dd25eb719adf1c0d0.tar.xz
seaweedfs-46e0b629e529f3aff535f90dd25eb719adf1c0d0.zip
Update tikv client version and add one PC support
Diffstat (limited to '.github')
-rw-r--r--.github/FUNDING.yml4
-rw-r--r--.github/dependabot.yml10
-rw-r--r--.github/pull_request_template.md10
-rw-r--r--.github/workflows/binaries_dev.yml124
-rw-r--r--.github/workflows/binaries_release0.yml (renamed from .github/workflows/release_binaries.yml)40
-rw-r--r--.github/workflows/binaries_release1.yml59
-rw-r--r--.github/workflows/binaries_release2.yml59
-rw-r--r--.github/workflows/binaries_release3.yml59
-rw-r--r--.github/workflows/binaries_release4.yml60
-rw-r--r--.github/workflows/binary_test.yml50
-rw-r--r--.github/workflows/cleanup.yml22
-rw-r--r--.github/workflows/codeql.yml43
-rw-r--r--.github/workflows/container_dev.yml66
-rw-r--r--.github/workflows/container_latest.yml82
-rw-r--r--.github/workflows/container_release.yml121
-rw-r--r--.github/workflows/container_release1.yml57
-rw-r--r--.github/workflows/container_release2.yml59
-rw-r--r--.github/workflows/container_release3.yml58
-rw-r--r--.github/workflows/container_release4.yml58
-rw-r--r--.github/workflows/container_release5.yml58
-rw-r--r--.github/workflows/container_test.yml53
-rw-r--r--.github/workflows/depsreview.yml14
-rw-r--r--.github/workflows/go.yml17
-rw-r--r--.github/workflows/release.yml68
24 files changed, 841 insertions, 410 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 000000000..b0d3b3355
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,4 @@
+# These are supported funding model platforms
+
+github: chrislusf
+patreon: seaweedfs
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..2e7a327bd
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,10 @@
+version: 2
+updates:
+- package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+- package-ecosystem: gomod
+ directory: "/"
+ schedule:
+ interval: weekly
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..b5899d12d
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,10 @@
+# What problem are we solving?
+
+
+
+# How are we solving the problem?
+
+
+# Checks
+- [ ] I have added unit tests if possible.
+- [ ] I will add related wiki document changes and link to this PR after merging.
diff --git a/.github/workflows/binaries_dev.yml b/.github/workflows/binaries_dev.yml
new file mode 100644
index 000000000..29b1cf6ab
--- /dev/null
+++ b/.github/workflows/binaries_dev.yml
@@ -0,0 +1,124 @@
+name: "go: build dev binaries"
+
+on:
+ push:
+ branches: [ master ]
+
+permissions:
+ contents: read
+
+jobs:
+
+ cleanup:
+ permissions:
+ contents: write # for mknejp/delete-release-assets to delete release assets
+ runs-on: ubuntu-latest
+
+ steps:
+
+ - name: Delete old release assets
+ uses: mknejp/delete-release-assets@a8aaab13272b1eaac16cc46dddd3f725b97ee05a # v1
+ with:
+ token: ${{ github.token }}
+ tag: dev
+ fail-if-no-assets: false
+ assets: |
+ weed-*
+
+ build_dev_linux_windows:
+ permissions:
+ contents: write # for wangyoucao577/go-release-action to upload release assets
+ needs: cleanup
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos: [linux, windows]
+ goarch: [amd64]
+
+ steps:
+
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+
+ - name: Set BUILD_TIME env
+ run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
+
+ - name: Go Release Binaries Large Disk
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ release_tag: dev
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed-large-disk
+ asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
+
+ - name: Go Release Binaries Normal Volume Size
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ release_tag: dev
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed-normal-disk
+ asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
+
+ build_dev_darwin:
+ permissions:
+ contents: write # for wangyoucao577/go-release-action to upload release assets
+ needs: build_dev_linux_windows
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos: [darwin]
+ goarch: [amd64, arm64]
+
+ steps:
+
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+
+ - name: Set BUILD_TIME env
+ run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
+
+ - name: Go Release Binaries Large Disk
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ release_tag: dev
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed-large-disk
+ asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
+
+ - name: Go Release Binaries Normal Volume Size
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ release_tag: dev
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed-normal-disk
+ asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
diff --git a/.github/workflows/release_binaries.yml b/.github/workflows/binaries_release0.yml
index 678f107d4..3a6cb734d 100644
--- a/.github/workflows/release_binaries.yml
+++ b/.github/workflows/binaries_release0.yml
@@ -1,44 +1,42 @@
# This is a basic workflow to help you get started with Actions
-name: "go: build versioned binaries"
+name: "go: build versioned binaries for windows"
on:
- release:
- types: [created]
+ push:
+ tags:
+ - '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+permissions:
+ contents: read
+
jobs:
- build:
+
+ build-release-binaries_windows:
+ permissions:
+ contents: write # for wangyoucao577/go-release-action to upload release assets
runs-on: ubuntu-latest
strategy:
matrix:
- goos: [linux, windows, darwin, freebsd, netbsd, openbsd]
- goarch: [amd64, arm, arm64, 386]
- exclude:
- - goarch: arm
- goos: darwin
- - goarch: 386
- goos: darwin
- - goarch: arm
- goos: windows
- - goarch: arm64
- goos: windows
+ goos: [windows]
+ goarch: [amd64]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v2
- - name: Go Release Binaries
- uses: wangyoucao577/go-release-action@v1.20
+ - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ - name: Go Release Binaries Normal Volume Size
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
overwrite: true
- pre_command: export CGO_ENABLED=0
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
# build_flags: -tags 5BytesOffset # optional, default is
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .`
@@ -46,13 +44,13 @@ jobs:
binary_name: weed
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
- name: Go Release Large Disk Binaries
- uses: wangyoucao577/go-release-action@v1.20
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
overwrite: true
- pre_command: export CGO_ENABLED=0
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset # optional, default is
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .`
diff --git a/.github/workflows/binaries_release1.yml b/.github/workflows/binaries_release1.yml
new file mode 100644
index 000000000..d0a51ce8f
--- /dev/null
+++ b/.github/workflows/binaries_release1.yml
@@ -0,0 +1,59 @@
+# This is a basic workflow to help you get started with Actions
+
+name: "go: build versioned binaries for linux"
+
+on:
+ push:
+ tags:
+ - '*'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+permissions:
+ contents: read
+
+jobs:
+
+ build-release-binaries_linux:
+ permissions:
+ contents: write # for wangyoucao577/go-release-action to upload release assets
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos: [linux]
+ goarch: [amd64, arm, arm64]
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ - name: Go Release Binaries Normal Volume Size
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ # build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
+ - name: Go Release Large Disk Binaries
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk"
diff --git a/.github/workflows/binaries_release2.yml b/.github/workflows/binaries_release2.yml
new file mode 100644
index 000000000..09e8fc7ae
--- /dev/null
+++ b/.github/workflows/binaries_release2.yml
@@ -0,0 +1,59 @@
+# This is a basic workflow to help you get started with Actions
+
+name: "go: build versioned binaries for darwin"
+
+on:
+ push:
+ tags:
+ - '*'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+permissions:
+ contents: read
+
+jobs:
+
+ build-release-binaries_darwin:
+ permissions:
+ contents: write # for wangyoucao577/go-release-action to upload release assets
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos: [darwin]
+ goarch: [amd64, arm64]
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ - name: Go Release Binaries Normal Volume Size
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ # build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
+ - name: Go Release Large Disk Binaries
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk"
diff --git a/.github/workflows/binaries_release3.yml b/.github/workflows/binaries_release3.yml
new file mode 100644
index 000000000..c96a91cee
--- /dev/null
+++ b/.github/workflows/binaries_release3.yml
@@ -0,0 +1,59 @@
+# This is a basic workflow to help you get started with Actions
+
+name: "go: build versioned binaries for freebsd"
+
+on:
+ push:
+ tags:
+ - '*'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+permissions:
+ contents: read
+
+jobs:
+
+ build-release-binaries_freebsd:
+ permissions:
+ contents: write # for wangyoucao577/go-release-action to upload release assets
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos: [freebsd]
+ goarch: [amd64, arm, arm64]
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ - name: Go Release Binaries Normal Volume Size
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ # build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
+ - name: Go Release Large Disk Binaries
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk"
diff --git a/.github/workflows/binaries_release4.yml b/.github/workflows/binaries_release4.yml
new file mode 100644
index 000000000..71434e6a4
--- /dev/null
+++ b/.github/workflows/binaries_release4.yml
@@ -0,0 +1,60 @@
+# This is a basic workflow to help you get started with Actions
+
+name: "go: build versioned binaries for linux with all tags"
+
+on:
+ push:
+ tags:
+ - '*'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+permissions:
+ contents: read
+
+jobs:
+
+ build-release-binaries_linux:
+ permissions:
+ contents: write # for wangyoucao577/go-release-action to upload release assets
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos: [linux]
+ goarch: [amd64]
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ - name: Go Release Binaries Normal Volume Size
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ build_flags: -tags elastic,ydb,gocdk
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ # build_flags: -tags 5BytesOffset # optional, default is
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full"
+ - name: Go Release Large Disk Binaries
+ uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ goos: ${{ matrix.goos }}
+ goarch: ${{ matrix.goarch }}
+ overwrite: true
+ pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
+ build_flags: -tags 5BytesOffset,elastic,ydb,gocdk
+ ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
+ # Where to run `go build .`
+ project_path: weed
+ binary_name: weed
+ asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full_large_disk"
diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml
deleted file mode 100644
index 8468555e3..000000000
--- a/.github/workflows/binary_test.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-name: "go: test building cross-platform binary"
-
-on:
- pull_request:
- workflow_dispatch: []
-
-jobs:
-
- build:
- name: Build
- runs-on: ubuntu-latest
- strategy:
- matrix:
- goos: [linux, windows, darwin, freebsd, netbsd, openbsd]
- goarch: [amd64, arm, arm64, 386]
- exclude:
- - goarch: arm
- goos: darwin
- - goarch: 386
- goos: darwin
- - goarch: arm
- goos: windows
- - goarch: arm64
- goos: windows
-
- concurrency:
- group: ${{ github.head_ref }}/binary_test/${{ matrix.goos }}/${{ matrix.goarch }}
- cancel-in-progress: true
-
- steps:
-
- - name: Set up Go 1.x
- uses: actions/setup-go@v2
- with:
- go-version: ^1.13
- id: go
-
- - name: Check out code into the Go module directory
- uses: actions/checkout@v2
-
- - name: Get dependencies
- run: |
- cd weed; go get -v -t -d ./...
- if [ -f Gopkg.toml ]; then
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure
- fi
-
- - name: Build
- run: cd weed; GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v .
diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml
deleted file mode 100644
index 34e3a481b..000000000
--- a/.github/workflows/cleanup.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: "chore: cleanup"
-
-on:
- push:
- branches: [ master ]
-
-jobs:
-
- build:
- name: Build
- runs-on: ubuntu-latest
-
- steps:
-
- - name: Delete old release assets
- uses: mknejp/delete-release-assets@v1
- with:
- token: ${{ github.token }}
- tag: dev
- fail-if-no-assets: false
- assets: |
- weed-*
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 000000000..142e4e963
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,43 @@
+name: "Code Scanning - Action"
+
+on:
+ pull_request:
+
+jobs:
+ CodeQL-Build:
+ # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
+ runs-on: ubuntu-latest
+
+ permissions:
+ # required for all workflows
+ security-events: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ # Override language selection by uncommenting this and choosing your languages
+ with:
+ languages: go
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below).
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ # â„šī¸ Command-line programs to run using the OS shell.
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
+
+ # âœī¸ If the Autobuild fails above, remove it and uncomment the following
+ # three lines and modify them (or add more) to build your code if your
+ # project uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/container_dev.yml b/.github/workflows/container_dev.yml
new file mode 100644
index 000000000..d8a2312ea
--- /dev/null
+++ b/.github/workflows/container_dev.yml
@@ -0,0 +1,66 @@
+name: "docker: build dev containers"
+
+on:
+ push:
+ branches: [ master ]
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+jobs:
+
+ build-dev-containers:
+ runs-on: [ubuntu-latest]
+
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ -
+ name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
+ with:
+ images: |
+ chrislusf/seaweedfs
+ ghcr.io/chrislusf/seaweedfs
+ tags: |
+ type=raw,value=dev
+ labels: |
+ org.opencontainers.image.title=seaweedfs
+ org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
+ org.opencontainers.image.vendor=Chris Lu
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
+ with:
+ buildkitd-flags: "--debug"
+ -
+ name: Login to Docker Hub
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ -
+ name: Login to GHCR
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
+ with:
+ registry: ghcr.io
+ username: ${{ secrets.GHCR_USERNAME }}
+ password: ${{ secrets.GHCR_TOKEN }}
+ -
+ name: Build
+ uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2
+ with:
+ context: ./docker
+ push: ${{ github.event_name != 'pull_request' }}
+ file: ./docker/Dockerfile.go_build
+ platforms: linux/amd64, linux/arm64
+ tags: ${{ steps.docker_meta.outputs.tags }}
+ labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml
index 1b952ae87..35dcea714 100644
--- a/.github/workflows/container_latest.yml
+++ b/.github/workflows/container_latest.yml
@@ -1,113 +1,63 @@
-name: "docker: build latest containers"
+name: "docker: build latest container"
on:
push:
- branches:
- - master
- workflow_dispatch: []
+ tags:
+ - '*'
+ workflow_dispatch: {}
-jobs:
- build-latest:
- runs-on: [ubuntu-latest]
+permissions:
+ contents: read
- steps:
- -
- name: Checkout
- uses: actions/checkout@v2
- -
- name: Docker meta
- id: docker_meta
- uses: docker/metadata-action@v3
- with:
- images: |
- chrislusf/seaweedfs
- ghcr.io/chrislusf/seaweedfs
- tags: |
- type=raw,value=latest
- labels: |
- org.opencontainers.image.title=seaweedfs
- org.opencontainers.image.vendor=Chris Lu
- -
- name: Set up QEMU
- uses: docker/setup-qemu-action@v1
- -
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- with:
- buildkitd-flags: "--debug"
- -
- name: Login to Docker Hub
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- -
- name: Login to GHCR
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ secrets.GHCR_USERNAME }}
- password: ${{ secrets.GHCR_TOKEN }}
- -
- name: Build
- uses: docker/build-push-action@v2
- with:
- context: ./docker
- push: ${{ github.event_name != 'pull_request' }}
- file: ./docker/Dockerfile
- platforms: linux/amd64, linux/arm, linux/arm64, linux/386
- tags: ${{ steps.docker_meta.outputs.tags }}
- labels: ${{ steps.docker_meta.outputs.labels }}
+jobs:
- build-dev:
+ build-latest-container:
runs-on: [ubuntu-latest]
steps:
-
name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
-
name: Docker meta
id: docker_meta
- uses: docker/metadata-action@v3
+ uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
with:
images: |
chrislusf/seaweedfs
ghcr.io/chrislusf/seaweedfs
tags: |
- type=raw,value=dev
+ type=raw,value=latest
labels: |
org.opencontainers.image.title=seaweedfs
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
org.opencontainers.image.vendor=Chris Lu
-
name: Set up QEMU
- uses: docker/setup-qemu-action@v1
+ uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
-
name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
with:
buildkitd-flags: "--debug"
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to GHCR
if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
-
name: Build
- uses: docker/build-push-action@v2
+ uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2
with:
context: ./docker
push: ${{ github.event_name != 'pull_request' }}
diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml
deleted file mode 100644
index 789316df8..000000000
--- a/.github/workflows/container_release.yml
+++ /dev/null
@@ -1,121 +0,0 @@
-name: "docker: build release containers"
-
-on:
- push:
- tags:
- - '*'
- workflow_dispatch: []
-
-jobs:
- build-default:
- runs-on: [ubuntu-latest]
-
- steps:
- -
- name: Checkout
- uses: actions/checkout@v2
- -
- name: Docker meta
- id: docker_meta
- uses: docker/metadata-action@v3
- with:
- images: |
- chrislusf/seaweedfs
- ghcr.io/chrislusf/seaweedfs
- tags: |
- type=ref,event=tag
- flavor: |
- latest=false
- labels: |
- org.opencontainers.image.title=seaweedfs
- org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
- org.opencontainers.image.vendor=Chris Lu
- -
- name: Set up QEMU
- uses: docker/setup-qemu-action@v1
- -
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- with:
- buildkitd-flags: "--debug"
- -
- name: Login to Docker Hub
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- -
- name: Login to GHCR
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ secrets.GHCR_USERNAME }}
- password: ${{ secrets.GHCR_TOKEN }}
- -
- name: Build
- uses: docker/build-push-action@v2
- with:
- context: ./docker
- push: ${{ github.event_name != 'pull_request' }}
- file: ./docker/Dockerfile.go_build
- platforms: linux/amd64, linux/arm, linux/arm64, linux/386
- tags: ${{ steps.docker_meta.outputs.tags }}
- labels: ${{ steps.docker_meta.outputs.labels }}
- build-large:
- runs-on: [ubuntu-latest]
-
- steps:
- -
- name: Checkout
- uses: actions/checkout@v2
- -
- name: Docker meta
- id: docker_meta
- uses: docker/metadata-action@v3
- with:
- images: |
- chrislusf/seaweedfs
- ghcr.io/chrislusf/seaweedfs
- tags: |
- type=ref,event=tag,suffix=_large_disk
- flavor: |
- latest=false
- labels: |
- org.opencontainers.image.title=seaweedfs
- org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
- org.opencontainers.image.vendor=Chris Lu
- -
- name: Set up QEMU
- uses: docker/setup-qemu-action@v1
- -
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- with:
- buildkitd-flags: "--debug"
- -
- name: Login to Docker Hub
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- -
- name: Login to GHCR
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ secrets.GHCR_USERNAME }}
- password: ${{ secrets.GHCR_TOKEN }}
- -
- name: Build
- uses: docker/build-push-action@v2
- with:
- context: ./docker
- push: ${{ github.event_name != 'pull_request' }}
- file: ./docker/Dockerfile.go_build_large
- platforms: linux/amd64, linux/arm, linux/arm64, linux/386
- tags: ${{ steps.docker_meta.outputs.tags }}
- labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/container_release1.yml b/.github/workflows/container_release1.yml
new file mode 100644
index 000000000..1bcf768cd
--- /dev/null
+++ b/.github/workflows/container_release1.yml
@@ -0,0 +1,57 @@
+name: "docker: build release containers for normal volume"
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+jobs:
+ build-default-release-container:
+ runs-on: [ubuntu-latest]
+
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ -
+ name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
+ with:
+ images: |
+ chrislusf/seaweedfs
+ tags: |
+ type=ref,event=tag
+ flavor: |
+ latest=false
+ labels: |
+ org.opencontainers.image.title=seaweedfs
+ org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
+ org.opencontainers.image.vendor=Chris Lu
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
+ -
+ name: Login to Docker Hub
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ -
+ name: Build
+ uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2
+ with:
+ context: ./docker
+ push: ${{ github.event_name != 'pull_request' }}
+ file: ./docker/Dockerfile.go_build
+ platforms: linux/amd64, linux/arm, linux/arm64, linux/386
+ tags: ${{ steps.docker_meta.outputs.tags }}
+ labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/container_release2.yml b/.github/workflows/container_release2.yml
new file mode 100644
index 000000000..c58bb2b40
--- /dev/null
+++ b/.github/workflows/container_release2.yml
@@ -0,0 +1,59 @@
+name: "docker: build release containers for large volume"
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+jobs:
+
+ build-large-release-container:
+ runs-on: [ubuntu-latest]
+
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ -
+ name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
+ with:
+ images: |
+ chrislusf/seaweedfs
+ tags: |
+ type=ref,event=tag,suffix=_large_disk
+ flavor: |
+ latest=false
+ labels: |
+ org.opencontainers.image.title=seaweedfs
+ org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
+ org.opencontainers.image.vendor=Chris Lu
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
+ -
+ name: Login to Docker Hub
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ -
+ name: Build
+ uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2
+ with:
+ context: ./docker
+ push: ${{ github.event_name != 'pull_request' }}
+ file: ./docker/Dockerfile.go_build
+ build-args: TAGS=5BytesOffset
+ platforms: linux/amd64, linux/arm, linux/arm64, linux/386
+ tags: ${{ steps.docker_meta.outputs.tags }}
+ labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/container_release3.yml b/.github/workflows/container_release3.yml
new file mode 100644
index 000000000..5ff6cd497
--- /dev/null
+++ b/.github/workflows/container_release3.yml
@@ -0,0 +1,58 @@
+name: "docker: build release containers for rocksdb"
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+jobs:
+
+ build-large-release-container_rocksdb:
+ runs-on: [ubuntu-latest]
+
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ -
+ name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
+ with:
+ images: |
+ chrislusf/seaweedfs
+ tags: |
+ type=ref,event=tag,suffix=_large_disk_rocksdb
+ flavor: |
+ latest=false
+ labels: |
+ org.opencontainers.image.title=seaweedfs
+ org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
+ org.opencontainers.image.vendor=Chris Lu
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
+ -
+ name: Login to Docker Hub
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ -
+ name: Build
+ uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2
+ with:
+ context: ./docker
+ push: ${{ github.event_name != 'pull_request' }}
+ file: ./docker/Dockerfile.rocksdb_large
+ platforms: linux/amd64
+ tags: ${{ steps.docker_meta.outputs.tags }}
+ labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/container_release4.yml b/.github/workflows/container_release4.yml
new file mode 100644
index 000000000..1bba0ee9c
--- /dev/null
+++ b/.github/workflows/container_release4.yml
@@ -0,0 +1,58 @@
+name: "docker: build release containers for all tags"
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+jobs:
+ build-default-release-container:
+ runs-on: [ubuntu-latest]
+
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ -
+ name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
+ with:
+ images: |
+ chrislusf/seaweedfs
+ tags: |
+ type=ref,event=tag,suffix=_full
+ flavor: |
+ latest=false
+ labels: |
+ org.opencontainers.image.title=seaweedfs
+ org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
+ org.opencontainers.image.vendor=Chris Lu
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
+ -
+ name: Login to Docker Hub
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ -
+ name: Build
+ uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2
+ with:
+ context: ./docker
+ push: ${{ github.event_name != 'pull_request' }}
+ file: ./docker/Dockerfile.go_build
+ build-args: TAGS=elastic,ydb,gocdk
+ platforms: linux/amd64
+ tags: ${{ steps.docker_meta.outputs.tags }}
+ labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/container_release5.yml b/.github/workflows/container_release5.yml
new file mode 100644
index 000000000..181e86fc4
--- /dev/null
+++ b/.github/workflows/container_release5.yml
@@ -0,0 +1,58 @@
+name: "docker: build release containers for all tags and large volume"
+
+on:
+ push:
+ tags:
+ - '*'
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+jobs:
+ build-default-release-container:
+ runs-on: [ubuntu-latest]
+
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
+ -
+ name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3
+ with:
+ images: |
+ chrislusf/seaweedfs
+ tags: |
+ type=ref,event=tag,suffix=_large_disk_full
+ flavor: |
+ latest=false
+ labels: |
+ org.opencontainers.image.title=seaweedfs
+ org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast!
+ org.opencontainers.image.vendor=Chris Lu
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1
+ -
+ name: Login to Docker Hub
+ if: github.event_name != 'pull_request'
+ uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+ -
+ name: Build
+ uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2
+ with:
+ context: ./docker
+ push: ${{ github.event_name != 'pull_request' }}
+ file: ./docker/Dockerfile.go_build
+ build-args: TAGS=5BytesOffset,elastic,ydb,gocdk
+ platforms: linux/amd64
+ tags: ${{ steps.docker_meta.outputs.tags }}
+ labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml
deleted file mode 100644
index d86392af5..000000000
--- a/.github/workflows/container_test.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-name: "docker: test building container images"
-
-on:
- pull_request:
- workflow_dispatch: []
-
-concurrency:
- group: ${{ github.head_ref }}/container_test
- cancel-in-progress: true
-
-jobs:
- build-test:
- runs-on: [ubuntu-latest]
- strategy:
- matrix:
- platform: [ linux ]
- arch: [ amd64, arm, arm64, 386 ]
-
- steps:
- -
- name: Checkout
- uses: actions/checkout@v2
- -
- name: Docker meta
- id: docker_meta
- uses: docker/metadata-action@v3
- with:
- images: |
- chrislusf/seaweedfs
- ghcr.io/chrislusf/seaweedfs
- tags: |
- type=raw,value=latest
- labels: |
- org.opencontainers.image.title=seaweedfs
- org.opencontainers.image.vendor=Chris Lu
- -
- name: Set up QEMU
- uses: docker/setup-qemu-action@v1
- -
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- with:
- buildkitd-flags: "--debug"
- -
- name: Build
- uses: docker/build-push-action@v2
- with:
- context: ./docker
- push: false
- file: ./docker/Dockerfile
- platforms: ${{ matrix.platform }}/${{ matrix.arch }}
- tags: ${{ steps.docker_meta.outputs.tags }}
- labels: ${{ steps.docker_meta.outputs.labels }}
diff --git a/.github/workflows/depsreview.yml b/.github/workflows/depsreview.yml
new file mode 100644
index 000000000..b84b27d15
--- /dev/null
+++ b/.github/workflows/depsreview.yml
@@ -0,0 +1,14 @@
+name: 'Dependency Review'
+on: [pull_request]
+
+permissions:
+ contents: read
+
+jobs:
+ dependency-review:
+ runs-on: ubuntu-latest
+ steps:
+ - name: 'Checkout Repository'
+ uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
+ - name: 'Dependency Review'
+ uses: actions/dependency-review-action@1c59cdf2a9c7f29c90e8da32237eb04b81bad9f0
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 39b8347ac..b5c407315 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -1,4 +1,4 @@
-name: "go: test building binary"
+name: "go: build binary"
on:
push:
@@ -10,6 +10,9 @@ concurrency:
group: ${{ github.head_ref }}/go
cancel-in-progress: true
+permissions:
+ contents: read
+
jobs:
build:
@@ -18,24 +21,20 @@ jobs:
steps:
- name: Set up Go 1.x
- uses: actions/setup-go@v2
+ uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 # v2
with:
go-version: ^1.13
id: go
- name: Check out code into the Go module directory
- uses: actions/checkout@v2
+ uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
- name: Get dependencies
run: |
cd weed; go get -v -t -d ./...
- if [ -f Gopkg.toml ]; then
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure
- fi
- name: Build
- run: cd weed; go build -v .
+ run: cd weed; go build -tags "elastic gocdk sqlite ydb" -v .
- name: Test
- run: cd weed; go test -v ./...
+ run: cd weed; go test -tags "elastic gocdk sqlite ydb" -v ./...
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index ac04a85dc..000000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-name: "go: build dev binaries"
-
-on:
- push:
- branches: [ master ]
-
-jobs:
-
- build:
- name: Build
- runs-on: ubuntu-latest
- strategy:
- matrix:
- goos: [linux, windows, darwin, freebsd, netbsd, openbsd]
- goarch: [amd64, arm, arm64, 386]
- exclude:
- - goarch: arm
- goos: darwin
- - goarch: 386
- goos: darwin
- - goarch: arm
- goos: windows
- - goarch: arm64
- goos: windows
-
- steps:
-
- - name: Check out code into the Go module directory
- uses: actions/checkout@v2
-
- - name: Wait for the deletion
- uses: jakejarvis/wait-action@master
- with:
- time: '30s'
-
- - name: Set BUILD_TIME env
- run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
-
- - name: Go Release Binaries
- uses: wangyoucao577/go-release-action@v1.20
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- goos: ${{ matrix.goos }}
- goarch: ${{ matrix.goarch }}
- release_tag: dev
- overwrite: true
- pre_command: export CGO_ENABLED=0
- build_flags: -tags 5BytesOffset # optional, default is
- ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
- # Where to run `go build .`
- project_path: weed
- binary_name: weed-large-disk
- asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
-
- - name: Go Release Binaries
- uses: wangyoucao577/go-release-action@v1.20
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- goos: ${{ matrix.goos }}
- goarch: ${{ matrix.goarch }}
- release_tag: dev
- overwrite: true
- pre_command: export CGO_ENABLED=0
- ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
- # Where to run `go build .`
- project_path: weed
- binary_name: weed
- asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"