Workflow adjustments. (#10806)

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2024-11-27 13:45:38 -05:00
committed by GitHub
parent 64b3280d76
commit 51e274644c
2 changed files with 12 additions and 3 deletions

View File

@@ -176,7 +176,8 @@ jobs:
-e GITLAB_TOKEN_USERNAME="${{ secrets.GITLAB_TOKEN_USERNAME }}" \
-v $(pwd):/output \
"satmandu/crewbuild:${CONTAINER}" \
/bin/chromebrewstart /output/tools/github_actions_update_builder.sh
/bin/chromebrewstart /output/tools/github_actions_update_builder.sh > >(tee -a /tmp/build.log) 2> >(tee -a /tmp/build.log >&2)
grep "Built and Uploaded:" /tmp/build.log
- name: Add updated packages to PR.
id: push-check
env:
@@ -204,11 +205,18 @@ jobs:
run: exit 1
- name: Report build success
run: echo "Update jobs succeeded. Creating a PR."
- uses: actions/checkout@v4
with:
clean: false
persist-credentials: true
ref: ${{ needs.update-check.outputs.output2 }}
- name: Create Pull Request
env:
CREW_BRANCH: ${{ needs.update-check.outputs.output2 }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git pull && git checkout ${CREW_BRANCH}
gh pr create --title "Updated Packages for ${{ needs.update-check.outputs.output1 }}" --body "Automatic PR to update packages" -r @active
git remote add chromebrew https://github.com/chromebrew/chromebrew.git
git fetch chromebrew
UPDATED_FILES=$(git diff-tree --no-commit-id --name-only -r $(git rev-parse chromebrew/master)..$(git rev-parse --verify HEAD))
gh pr create --title "Updated Packages for ${{ needs.update-check.outputs.output1 }}" --body "Automatic PR to update packages\n${UPDATED_FILES}" -r @active