Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Dependabot and fix some actions #4944

Open
wants to merge 31 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
37c2680
Update
blu3berryys Feb 4, 2025
d873809
Bump
blu3berryys Feb 4, 2025
e552803
Uppercase
blu3berryys Feb 4, 2025
29f40d2
Update
blu3berryys Feb 4, 2025
badc994
Fix
blu3berryys Feb 4, 2025
6671fa3
Add important note
blu3berryys Feb 4, 2025
94c3e52
Setup Dependabot
blu3berryys Feb 4, 2025
88f2611
Fix
blu3berryys Feb 4, 2025
26fc0a9
Bump @zen-browser/surfer from 1.9.15 to 1.9.16
dependabot[bot] Feb 4, 2025
4626145
Add custom free disk space script
blu3berryys Feb 4, 2025
44eea8f
Use custom script
blu3berryys Feb 4, 2025
175b4a8
Use custom script
blu3berryys Feb 4, 2025
f05bf1a
Bump Surfer
blu3berryys Feb 4, 2025
6d76e45
Update license
blu3berryys Feb 4, 2025
2484540
Bump Python
blu3berryys Feb 4, 2025
87b8bec
Merge branch 'zen-browser:dev' into dev
blu3berryys Feb 5, 2025
9dbf1a9
Delete .vscode directory
blu3berryys Feb 5, 2025
e3583ed
Bump
blu3berryys Feb 5, 2025
7455fde
Bump prettier from 3.4.2 to 3.5.0
dependabot[bot] Feb 10, 2025
19ed3b1
Delete .github/workflows/staler.yml
blu3berryys Feb 12, 2025
27a2407
Merge pull request #2 from blu3berryys/dependabot/npm_and_yarn/pretti…
blu3berryys Feb 12, 2025
5ff7aed
Merge pull request #3 from zen-browser/dev
blu3berryys Feb 12, 2025
c0a0468
Merge branch 'dev' into dev
mauro-balades Feb 12, 2025
6ed7256
Add workflow dispatch
blu3berryys Feb 13, 2025
2317f24
Add
blu3berryys Feb 13, 2025
f3c5601
Update macos-universal-release-build.yml
blu3berryys Feb 13, 2025
51fedf8
Update macos-release-build.yml
blu3berryys Feb 13, 2025
3f601ab
Update linux-release-build.yml
blu3berryys Feb 13, 2025
a6cc749
Update macos-release-build.yml
blu3berryys Feb 13, 2025
2d93cf5
Update macos-universal-release-build.yml
blu3berryys Feb 13, 2025
bd311da
Update windows-profile-build.yml
blu3berryys Feb 13, 2025
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
6 changes: 3 additions & 3 deletions .github/workflows/check-candidate-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Check Firefox Candidate Release

on:
schedule:
- cron: '59 4 * * 2'
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
check_candidates:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Check for any updates
env:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/issue-metrics.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Monthly issue metrics

on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'
- cron: '0 0 1 * *'

jobs:
build:
name: issue metrics
name: Issue metrics
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.DEPLOY_KEY }}

Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
echo "last_month_year=$previous_year" >> "$GITHUB_ENV"

- name: Run issue-metrics tool
uses: github/issue-metrics@v2
uses: github/issue-metrics@v3
env:
GH_TOKEN: ${{ secrets.DEPLOY_KEY }}
HIDE_AUTHOR: true
Expand All @@ -52,7 +53,7 @@ jobs:
rm -f docs/issue-metrics/${{ env.last_month_year }}_${{ env.last_month }}.md
mv issue_metrics.md docs/issue-metrics/${{ env.last_month_year }}_${{ env.last_month }}.md

- name: Remove metrisc JSON
- name: Remove metrics JSON
run: |
rm -f issue_metrics.json

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/linux-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
type: string
required: true
default: ''
workflow_dispatch:

jobs:
build-linux:
Expand All @@ -29,10 +30,8 @@ jobs:
name: Build Linux - ${{ matrix.arch }}

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
- name: Free disk space
run: src/free_disk_space.sh

- name: Checkout repository
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
type: string
required: true
default: ''
workflow_dispatch:

jobs:
mac-build:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos-universal-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ on:
description: 'The branch to build'
required: true
type: string
workflow_dispatch:

jobs:
mac-build:
name: Unify macOS (Universal)
runs-on: 'macos-14'
runs-on: macos-14

strategy:
fail-fast: false
Expand Down
152 changes: 152 additions & 0 deletions .github/workflows/src/free_disk_space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
#!/bin/bash
set -euo pipefail

isX86() {
local arch
arch=$(uname -m)
if [ "$arch" = "x86_64" ]; then
return 0
else
return 1
fi
}

printSeparationLine() {
for ((i = 0; i < 80; i++)); do
printf "%s" "$1"
done
printf "\n"
}

getAvailableSpace() {
df -a | awk 'NR > 1 {avail+=$4} END {print avail}'
}

formatByteCount() {
numfmt --to=iec-i --suffix=B --padding=7 "$1"'000'
}

printSavedSpace() {
local before=${1}
local title=${2:-}

local after
after=$(getAvailableSpace)
local saved=$((after - before))

echo ""
printSeparationLine "*"
if [ -n "${title}" ]; then
echo "=> ${title}: Saved $(formatByteCount "$saved")"
else
echo "=> Saved $(formatByteCount "$saved")"
fi
printSeparationLine "*"
echo ""
}

printDF() {
local caption=${1}

printSeparationLine "="
echo "${caption}"
echo ""
echo "$ df -h"
echo ""
df -h
printSeparationLine "="
}

removeDir() {
dir=${1}

local before
if [ ! -d "$dir" ]; then
echo "::warning::Directory $dir does not exist, skipping."
else
before=$(getAvailableSpace)
sudo rm -rf "$dir"
printSavedSpace "$before" "Removed $dir"
fi
}

removeUnusedDirectories() {
local dirs_to_remove=(
"/usr/local/lib/android"
"/usr/share/dotnet"
"/usr/local/.ghcup"
)

for dir in "${dirs_to_remove[@]}"; do
removeDir "$dir"
done
}

execAndMeasureSpaceChange() {
local operation=${1}
local title=${2}

local before
before=$(getAvailableSpace)
$operation

printSavedSpace "$before" "$title"
}

cleanPackages() {
local packages=(
'^aspnetcore-.*'
'^dotnet-.*'
'^llvm-.*'
'^mongodb-.*'
'^mysql-.*'
'azure-cli'
'firefox'
'libgl1-mesa-dri'
'mono-devel'
'php.*'
)

if isX86; then
packages+=(
'google-chrome-stable'
'google-cloud-cli'
'google-cloud-sdk'
'powershell'
)
fi

sudo apt-get -qq remove -y --fix-missing "${packages[@]}"
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed"
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed"
}

cleanDocker() {
echo "=> Removing the following Docker images:"
sudo docker image ls
echo "=> Removing Docker images..."
sudo docker image prune --all --force || true
}

cleanSwap() {
sudo swapoff -a || true
sudo rm -rf /mnt/swapfile || true
free -h
}

AVAILABLE_INITIAL=$(getAvailableSpace)

printDF "BEFORE CLEAN-UP:"
echo ""

execAndMeasureSpaceChange cleanPackages "Unused packages"
execAndMeasureSpaceChange cleanDocker "Docker images"
execAndMeasureSpaceChange cleanSwap "Swap storage"

removeUnusedDirectories

echo ""
printDF "After clean-up:"

echo ""
printSavedSpace "$AVAILABLE_INITIAL" "Total saved"
3 changes: 2 additions & 1 deletion .github/workflows/windows-profile-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
description: 'The branch to build'
required: true
type: string
workflow_dispatch:

jobs:
windows-profile-build:
Expand Down Expand Up @@ -96,7 +97,7 @@ jobs:

- name: Debug session
if: ${{ failure() }}
uses: WarpBuilds/action-debugger@v1.3
uses: WarpBuilds/action-debugger@v1
timeout-minutes: 15

- name: Move profile data
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
type: string
required: true
default: ''
workflow_dispatch:

jobs:
windows-build:
Expand All @@ -35,11 +36,9 @@ jobs:
arch: [x86_64, aarch64]

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- name: Free disk space
run: src/free_disk_space.sh
if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
with:
tool-cache: false

- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -160,6 +159,7 @@ jobs:
ls ~/win-cross/wine || true
ls ~/win-cross/vs2022 || true

# MIGRATE THIS TO dtolnay/rust-toolchain
- name: Setup Rust
if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.13
30 changes: 0 additions & 30 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Mozilla Public License Version 2.0
means any form of the work other than Source Code Form.

1.7. "Larger Work"
means a work that combines Covered Software with other material, in
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.

1.8. "License"
Expand Down Expand Up @@ -370,4 +370,4 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------

This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
defined by the Mozilla Public License, v. 2.0.
Loading