Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fanny-jiang committed Jan 4, 2024
1 parent 8888913 commit 4b5e257
Showing 1 changed file with 14 additions and 25 deletions.
39 changes: 14 additions & 25 deletions .github/workflows/publish-community-operators-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,26 @@ jobs:
echo "COMMUNITY_BRANCH_NAME=$BRANCH_NAME_BASE-$GH_REF_NAME" >> $GITHUB_ENV
echo "TARGET_GH_ORG=${{ inputs.org }}" >> $GITHUB_ENV
echo "TARGET_GH_REPO=${{ inputs.repo }}" >> $GITHUB_ENV
echo "BUNDLE_PATH=tmp/bundle" >> $GITHUB_ENV
if [[ "${{ !inputs.community_repo }}" ]]; then
if [[ "${{ inputs.repo }}" == "redhat-marketplace-operators" ]]; then
echo "BUNDLE_PATH=tmp/bundle-redhat-mp" >> $GITHUB_ENV
elif [[ "${{ inputs.repo }}" == "certified-operators" ]]; then
echo "BUNDLE_PATH=tmp/bundle-redhat" >> $GITHUB_ENV
fi
echo "${{ secrets.REDHAT_TOKEN }} >> ~/.redhat/auths.json"
sudo apt-get -y update
sudo apt-get -y install skopeo
fi
- name: validate env
run: |
echo "$VERSION"
echo "$COMMUNITY_BRANCH_NAME"
echo "$TARGET_GH_ORG"
echo "$TARGET_GH_REPO"
# - 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,community-operators-prod,redhat-marketplace-operators,certified-operators"
echo "$BUNDLE_PATH"
- name: checkout fork
uses: actions/checkout@v4
Expand All @@ -70,25 +75,9 @@ jobs:
path: tmp/

- name: update bundle
if: ${{ inputs.community_repo }}
run: |
mkdir operators/datadog-operator/$VERSION
cp -R ./tmp/bundle/* operators/datadog-operator/$VERSION
rm -rf ./tmp
- name: update redhat bundle
if: ${{ !inputs.community_repo }}
working-directory: tmp
run: |
echo $PWD
make bundle-redhat
mkdir operators/datadog-operator/$VERSION
if [[ "${{ inputs.repo }}" == "redhat-marketplace-operators" ]]; then
cp -R ./tmp/bundle-redhat-mp/* operators/datadog-operator/$VERSION
elif [[ "${{ inputs.repo }}" == "certified-operators" ]]; then
cp -R ./tmp/bundle-redhat-mp/* operators/datadog-operator/$VERSION
fi
cp -R ./tmp/bundle-redhat/* operators/datadog-operator/$VERSION
cp -R ./$BUNDLE_PATH/* operators/datadog-operator/$VERSION
rm -rf ./tmp
- name: Configure git user
Expand Down

0 comments on commit 4b5e257

Please sign in to comment.