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

Create devtoolsBuilder.yml #1

Merged
merged 1 commit into from
Jun 13, 2024
Merged
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
58 changes: 58 additions & 0 deletions .github/workflows/devtoolsBuilder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: build

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

permissions:
contents: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest

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

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
python3 \
git \
curl \
gn \
npm

- name: Install Depot Tools
uses: newkdev/[email protected]

- name: Fetch devtools-frontend
run: fetch --no-history devtools-frontend

- name: Build devtools-frontend
run: |
cd devtools-frontend
gclient sync
gn gen out/Default
autoninja -C out/Default

- name: Create commit
id: create_commit
run: |
# Copy built files
rsync -a ./devtools-frontend/out/Default/gen/front_end ./public/
# Create commit info with latest devtools-frontend commit
current_date=$(date +"%d-%m-%Y")
latest_commit_full=$(git ls-remote https://chromium.googlesource.com/devtools/devtools-frontend.git HEAD | cut -f 1)
latest_commit_short=${latest_commit_full:0:7}
commit_title="Build $current_date"
commit_description="Latest devtools frontend commit: [${latest_commit_short}](https://chromium.googlesource.com/devtools/devtools-frontend.git/+/${latest_commit_full})"
branch_name="build/${current_date}"
# Create step outputs
echo "branch_name=${branch_name}" >> $GITHUB_OUTPUT
echo "commit_title=${commit_title}" >> $GITHUB_OUTPUT
echo "commit_description=${commit_description}" >> $GITHUB_OUTPUT
Loading