-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: add weekly job to update bootc-image-builder ref
- Loading branch information
1 parent
4d6f9e9
commit 25a4b39
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This action updates the bootc-image-builder ref in the Schutzfile | ||
--- | ||
name: "Update bootc-image-builder ref" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Every Sunday at 05:00 | ||
- cron: "0 5 * * 7" | ||
|
||
jobs: | ||
update-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Apt update | ||
run: sudo apt update | ||
|
||
- name: Install Dependencies | ||
run: sudo apt install -y skopeo python3 | ||
|
||
- name: Update Schutzfile | ||
run: ./test/scripts/update-schutzfile-bib | ||
|
||
- name: Open PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SCHUTZBOT_GH_TOKEN }} | ||
run: | | ||
git config user.name "schutzbot" | ||
git config user.email "[email protected]" | ||
branch="schutzfile-bib-$(date -I)" | ||
git checkout -b "${branch}" | ||
git add Schutzfile | ||
git commit -m "schutzfile: Update bootc-image-builder ref" | ||
git push https://"$GITHUB_TOKEN"@github.com/schutzbot/images.git | ||
echo "Updating bootc-image-builder test container ref to latest" | ||
gh pr create \ | ||
-t "Update bootc-image-builder ref to latest" \ | ||
-F "body" \ | ||
--repo "osbuild/images" \ | ||
--base "main" \ | ||
--head "schutzbot:${branch}" |