Skip to content

Commit

Permalink
Adding a GitHub workflow to pull code changes for opc
Browse files Browse the repository at this point in the history
  • Loading branch information
savitaashture committed Mar 11, 2024
1 parent dfb34a7 commit faf2d4e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update-opc.yaml
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 }}

0 comments on commit faf2d4e

Please sign in to comment.