mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-03 18:44:24 +08:00
Add dependabot & Fix sccache fail in CI (#1451)
* - Prevent sponsor.yml running on fork repos - Use gcr mirror for docker image pull - Add dependabot * Update sccache version & adjust for github change & fix foundationdb pkg download url
This commit is contained in:
parent
f3ae865f38
commit
7dc620816f
5 changed files with 31 additions and 8 deletions
19
.github/dependabot.yml
vendored
Normal file
19
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
# Enable version updates for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
# Workflow files stored in the default location of `.github/workflows`
|
||||
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
|
@ -157,6 +157,9 @@ jobs:
|
|||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
mirrors = ["https://mirror.gcr.io"]
|
||||
driver-opts: |
|
||||
network=host
|
||||
|
||||
|
@ -301,7 +304,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.7
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
with:
|
||||
disable_annotations: true
|
||||
|
||||
|
@ -334,7 +337,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.7
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
with:
|
||||
disable_annotations: true
|
||||
|
||||
|
@ -344,7 +347,7 @@ jobs:
|
|||
run: |
|
||||
rustup target add ${{matrix.target}}
|
||||
# Get latest FoundationDB installer
|
||||
curl --retry 5 -Lso foundationdb.pkg "$(gh api -X GET /repos/apple/foundationdb/releases --jq '.[] | select(.prerelease == false) | .assets[] | select(.name | test("${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}" + ".pkg")) | .browser_download_url' | head -n1)"
|
||||
curl --retry 5 -Lso foundationdb.pkg "$(gh api -X GET /repos/apple/foundationdb/releases --jq '.[] | select(.prerelease == false) | .assets[] | select(.name | test("${{startsWith(matrix.target, 'x86') && 'x86_64' || 'arm64'}}" + ".pkg$")) | .browser_download_url' | head -n1)"
|
||||
sudo installer -allowUntrusted -dumplog -pkg foundationdb.pkg -target /
|
||||
cargo build --release --target ${{matrix.target}} -p mail-server --no-default-features --features "foundationdb elastic s3 redis enterprise"
|
||||
mkdir -p artifacts
|
||||
|
|
1
.github/workflows/sponsors.yml
vendored
1
.github/workflows/sponsors.yml
vendored
|
@ -7,6 +7,7 @@ permissions:
|
|||
contents: write
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.event_name != 'schedule' || !github.event.repository.fork
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
|
|
|
@ -70,7 +70,7 @@ RUN \
|
|||
fi
|
||||
# Cargo-chef Cache layer
|
||||
RUN \
|
||||
--mount=type=secret,id=ACTIONS_CACHE_URL,env=ACTIONS_CACHE_URL \
|
||||
--mount=type=secret,id=ACTIONS_RESULTS_URL,env=ACTIONS_RESULTS_URL \
|
||||
--mount=type=secret,id=ACTIONS_RUNTIME_TOKEN,env=ACTIONS_RUNTIME_TOKEN \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
|
@ -79,7 +79,7 @@ RUN \
|
|||
RUSTFLAGS="-L /usr/lib" cargo chef cook --recipe-path recipe.json --zigbuild --release --target ${TARGET} -p mail-server --no-default-features --features "foundationdb elastic s3 redis enterprise"; \
|
||||
fi
|
||||
RUN \
|
||||
--mount=type=secret,id=ACTIONS_CACHE_URL,env=ACTIONS_CACHE_URL \
|
||||
--mount=type=secret,id=ACTIONS_RESULTS_URL,env=ACTIONS_RESULTS_URL \
|
||||
--mount=type=secret,id=ACTIONS_RUNTIME_TOKEN,env=ACTIONS_RUNTIME_TOKEN \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
|
@ -92,7 +92,7 @@ ENV RUSTC_WRAPPER="sccache" \
|
|||
SCCACHE_GHA_ENABLED=true
|
||||
# Build FoundationDB version
|
||||
RUN \
|
||||
--mount=type=secret,id=ACTIONS_CACHE_URL,env=ACTIONS_CACHE_URL \
|
||||
--mount=type=secret,id=ACTIONS_RESULTS_URL,env=ACTIONS_RESULTS_URL \
|
||||
--mount=type=secret,id=ACTIONS_RUNTIME_TOKEN,env=ACTIONS_RUNTIME_TOKEN \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
|
@ -103,7 +103,7 @@ RUN \
|
|||
fi
|
||||
# Build generic version
|
||||
RUN \
|
||||
--mount=type=secret,id=ACTIONS_CACHE_URL,env=ACTIONS_CACHE_URL \
|
||||
--mount=type=secret,id=ACTIONS_RESULTS_URL,env=ACTIONS_RESULTS_URL \
|
||||
--mount=type=secret,id=ACTIONS_RUNTIME_TOKEN,env=ACTIONS_RUNTIME_TOKEN \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
|
|
|
@ -16,7 +16,7 @@ variable "DOCKER_PLATFORM" {
|
|||
target "docker-metadata-action" {}
|
||||
target "build" {
|
||||
secret = [
|
||||
"type=env,id=ACTIONS_CACHE_URL",
|
||||
"type=env,id=ACTIONS_RESULTS_URL",
|
||||
"type=env,id=ACTIONS_RUNTIME_TOKEN"
|
||||
]
|
||||
args = {
|
||||
|
|
Loading…
Add table
Reference in a new issue