Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fanny-jiang committed Jan 2, 2024
1 parent 6b24abb commit 7cb51ab
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions .github/workflows/release-community-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,44 @@ jobs:
pull-requests: write
env:
GH_REF_NAME: vX.Y.Z
COMMUNITY_BRANCH_NAME: ${{ github.actor }}/datadog-operator
BRANCH_NAME_BASE: ${{ github.actor }}/datadog-operator
steps:
- name: setup env
run: |
echo "VERSION=${GH_REF_NAME:1:5}" >> $GITHUB_ENV
echo $VERSION
echo "COMMUNITY_BRANCH_NAME=$COMMUNITY_BRANCH_NAME-$GH_REF_NAME" >> $GITHUB_ENV
echo "COMMUNITY_BRANCH_NAME=$BRANCH_NAME_BASE-$GH_REF_NAME" >> $GITHUB_ENV
- name: validate env
run: |
echo "$VERSION"
echo "$COMMUNITY_BRANCH_NAME"
# - name: create github token
# uses: actions/[email protected]
# id: app-token
# with:
# app-id: ${{vars.GH_APP_ID}}
# private-key: ${{secrets.GH_APP_PRIVATE_KEY}}
# repositories: "datadog-operator,community-operators"
#
# - name: checkout fork
# uses: actions/checkout@v4
# with:
# repository: DataDog/community-operators
# token: ${{ secrets.GITHUB_TOKEN }}
#
# - name: sync fork
# env:
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# run: |
# git checkout -b $COMMUNITY_BRANCH_NAME
# git push -f --set-upstream origin $COMMUNITY_BRANCH_NAME
# gh repo sync DataDog/community-operators --branch $COMMUNITY_BRANCH_NAME \
- name: create github token
uses: actions/[email protected]
id: app-token
with:
app-id: ${{vars.GH_APP_ID}}
private-key: ${{secrets.GH_APP_PRIVATE_KEY}}
repositories: "datadog-operator,community-operators"

- name: checkout fork
uses: actions/checkout@v4
with:
repository: DataDog/community-operators
token: ${{ secrets.GITHUB_TOKEN }}

- name: sync fork
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
git checkout -b $COMMUNITY_BRANCH_NAME
git push -f --set-upstream origin $COMMUNITY_BRANCH_NAME
gh repo sync DataDog/community-operators --branch $COMMUNITY_BRANCH_NAME \
--source k8s-operatorhub/community-operators \
--force
# gh repo sync DataDog/community-operators --branch release \
# --source k8s-operatorhub/community-operators \
# --force
## gh repo sync DataDog/community-operators --branch release \
## --source k8s-operatorhub/community-operators \
## --force
#
# - name: checkout datadog-operator to tmp/ dir
# uses: actions/checkout@v4
Expand Down

0 comments on commit 7cb51ab

Please sign in to comment.