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: create github token
uses: actions/create-github-app-token@v1.6.2
id: app-token
with:
app-id: ${{vars.GH_APP_ID}}
private-key: ${{secrets.GH_APP_PRIVATE_KEY}}
repositories: "datadog-operator,community-operators"

Check failure on line 16 in .github/workflows/release-community-pr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-community-pr.yml

Invalid workflow file

You have an error in your yaml syntax on line 16
- name: sync fork
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
# check out new branch for new version
gh repo sync DataDog/community-operators --branch new-version \
--source k8s-operatorhub/community-operators \
--force
- name: checkout fork
uses: actions/checkout@v4
with:
repository: DataDog/community-operators
token: ${{ steps.app-token.outputs.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/test-version
cp -R ./tmp/bundle/* operators/datadog-operator/test-version
- name: Configure git user
env:
GITHUB_USERNAME: ${{vars.GITHUB_TRIGGERING_ACTOR}}
GITHUB_USER_ID: ${{vars.GITHUB_ACTOR_ID}}
GITHUB_ACTOR: ${{vars.GITHUB_ACTOR}}
run: |
echo "Github TRIGGERING ACTOR: $GITHUB_USERNAME"
echo "Github ACTOR ID: $GITHUB_USER_ID"
echo "Github ACTOR: $GITHUB_ACTOR"
git config user.name $GITHUB_USERNAME
git config user.email $GITHUB_USER_ID+$GITHUB_USERNAME@users.noreply.github.com
- name: create PR
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
message="test PR"
body="test PR"
branch="community-prs-new"
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 DataDog/community-operators \
--base main \
--draft