Update check_git_apply.yaml

This commit is contained in:
uazo 2022-10-28 07:35:12 -08:00 committed by GitHub
parent c4f7fedb9a
commit 946df3e35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,10 @@ on:
description: 'uazo/bromite TAG or COMMIT' description: 'uazo/bromite TAG or COMMIT'
required: true required: true
default: '' default: ''
branch:
description: 'uazo/bromite BRANCH'
required: true
default: ''
env: env:
GITHUB_SHA: ${{ github.event.inputs.rtag }} GITHUB_SHA: ${{ github.event.inputs.rtag }}
@ -23,7 +27,6 @@ jobs:
GITHUB_SHA: ${{ github.event.inputs.rtag }} GITHUB_SHA: ${{ github.event.inputs.rtag }}
USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images USELOCALIMAGE: true # CUSTOM RUNNER: permit use of local images
REMOVEDOCKERSUPPORT: false # CUSTOM RUNNER: remove sharing of docker socket REMOVEDOCKERSUPPORT: false # CUSTOM RUNNER: remove sharing of docker socket
GH_ENV: "/__w/_temp/_runner_file_commands"
volumes: volumes:
- /tmp/proxy:/tmp/proxy - /tmp/proxy:/tmp/proxy
@ -57,12 +60,11 @@ jobs:
unzip pup_v0.4.0_linux_amd64.zip unzip pup_v0.4.0_linux_amd64.zip
rm pup_v0.4.0_linux_amd64.zip rm pup_v0.4.0_linux_amd64.zip
BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$GITHUB_SHA | ./pup -p li.branch:last-child a text{}) BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$GITHUB_SHA | ./pup -p li.branch:last-child a text{})
echo "BRANCH=$BRANCH" >> $GH_ENV
test -d /github/home/.vscode-server || sudo mkdir /github/home/.vscode-server test -d /github/home/.vscode-server || sudo mkdir /github/home/.vscode-server
sudo chown lg /github/home/.vscode-server sudo chown lg /github/home/.vscode-server
- name: Checkout 'uazo/bromite' ${{ env.BRANCH }} - name: Checkout 'uazo/bromite'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: 'uazo/bromite' repository: 'uazo/bromite'
@ -70,13 +72,9 @@ jobs:
path: 'bromite' path: 'bromite'
fetch-depth: 1 fetch-depth: 1
- name: Check chromium version - name: Download chromium sources
run: | run: |
VERSION=$(cat bromite/build/RELEASE) VERSION=$(cat bromite/build/RELEASE)
echo "VERSION=$VERSION" >> $GH_ENV
- name: Download chromium ${{ env.VERSION }} sources
run: |
./bin/SuperPatchUtils bromite $GITHUB_SHA chromium/src ./bin/SuperPatchUtils bromite $GITHUB_SHA chromium/src
cd chromium/src cd chromium/src
git init git init
@ -116,26 +114,21 @@ jobs:
run: | run: |
cd bromite cd bromite
CHANGES=0 && git diff --quiet || CHANGES=1 CHANGES=0 && git diff --quiet || CHANGES=1
echo "CHANGES=$CHANGES" >> $GH_ENV
if [[ CHANGES -eq 1 ]]; then if [[ CHANGES -eq 1 ]]; then
git add build/patches/*.patch git add build/patches/*.patch
git diff --name-only --staged git diff --name-only --staged
# MESSAGE=$(git diff --name-only --staged)
# echo "MESSAGE='$MESSAGE'" >> $GH_ENV
fi fi
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a #v3.12.0 uses: peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a #v3.12.0
if: env.CHANGES == '1'
with: with:
path: bromite path: bromite
base: ${{ env.BRANCH }} base: ${{ github.event.inputs.branch }}
#push-to-fork: uazo/bromite
add-paths: | add-paths: |
build/patches/*.patch build/patches/*.patch
commit-message: 'AUTOMATED - git apply results' commit-message: 'AUTOMATED - git apply results'
title: Git apply result for ${{ env.BRANCH }} branch title: Git apply result for ${{ github.event.inputs.branch }} branch
body: ${{ env.MESSAGE }} body: ${{ env.MESSAGE }}
delete-branch: true delete-branch: true
branch-suffix: short-commit-hash branch-suffix: short-commit-hash