Skip to content
name: openshift community pull requests
on: [push]
jobs:
create-community-pr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: sync fork
env:
GH_TOKEN: ${{ secrets.TEMP_GH_SYNC_TOKEN }}
run: |
gh repo sync DataDog/community-operators \
--source k8s-operatorhub/community-operators \
--force
- name: checkout fork
uses: actions/checkout@v4
with:
repository: DataDog/community-operators
token: ${{ secrets.TEMP_GH_SYNC_TOKEN }}
- name: checkout datadog-operator to tmp/ dir
uses: actions/checkout@v4
with:
repository: Datadog/datadog-operator
token: ${{ secrets.GITHUB_TOKEN }}
path: tmp/
- name: update bundle
run: |
mkdir operators/datadog-operator/version
cp -R ./tmp/bundle/* operators/datadog-operator/version
rm -rf ./tmp
- name: Configure git user
run: |
git config user.name fanny-jiang
git config user.email 23389847+fanny-jiang@users.noreply.github.com
- name: create PR
env:
GITHUB_TOKEN: ${{ secrets.TEMP_GH_SYNC_TOKEN }}
run: |
message="[DO NOT MERGE] operator datadog-operator (version)"
body="DO NOT MERGE - Testing automated PR workflow"
branch="datadog-operator-version"
git checkout -b $branch
git add -A
git commit -s -m "$message"
git push -f --set-upstream origin $branch
gh pr create --title "$message" \
--body "$body" \
--repo k8s-operatorhub/community-operators \
--base main \
--draft