Skip to content

Commit

Permalink
docs: add PR environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
addetz committed Oct 23, 2024
1 parent 092813c commit 39fdeb4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/clean-up-unused-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ jobs:
- name: Create PR with unused images
run: |
unused_image_count=$(wc -l < unused_images.json)
if unused_image_count == 0; then
"No images found to remove."
exit 0
fi
# Ensure that we are on master.
git checkout master
Expand Down Expand Up @@ -87,9 +93,13 @@ jobs:
The images are identified using `scripts/find-unused-images.sh` script.
Please review this PR carefully before merging it.'
gh pr create --base master --title "docs: clean up librarium unused images " --body "$pr_body" --label "$backport_labels"
pr_id=$(gh pr create --base master --title "docs: clean up librarium unused images " --body "$pr_body" --label "$backport_labels" --json url -q .url)
echo $pr_id
echo "CREATED_CLEANUP_PR=pr_id" >> $GITHUB_ENV
echo "PR successfully created $CREATED_CLEANUP_PR."
env:
GH_TOKEN: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}


0 comments on commit 39fdeb4

Please sign in to comment.