-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a GitHub workflow to pull code changes for opc
- Loading branch information
1 parent
dfb34a7
commit faf2d4e
Showing
1 changed file
with
38 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,38 @@ | ||
name: update-opc | ||
|
||
on: | ||
schedule: | ||
- cron: "*/30 * * * * *" # every 30 seconds | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout the current repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Clone openshift-pipelines/opc | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: openshift-pipelines/opc | ||
path: opc | ||
|
||
- name: Commit new changes | ||
run: | | ||
ls opc/ | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git checkout -b actions/update/opc | ||
rm -rf opc/.git | ||
git add opc | ||
git commit -m "[bot] Update openshift-pipelines/opc" | ||
git push -f origin actions/update/opc | ||
- name: Create pull request | ||
run: gh pr create -B main -H actions/update/opc --title "[bot] Update openshift-pipelines/opc" --body "Auto-generated pull request by GitHub actions" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |